Skip to content

Commit

Permalink
Merge pull request #485 from martenrebane/MOPPIOS-1148-2
Browse files Browse the repository at this point in the history
Fix link underline color
  • Loading branch information
Counter178 authored Apr 22, 2024
2 parents f84f1c7 + fc4b810 commit 88b3c9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion MoppApp/MoppApp/AppInfoCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ class AppInfoCell: UITableViewCell {
let nsRange = NSRange(range, in: contactText)

attributedString.addAttribute(.link, value: L(.infoAppContactLink), range: nsRange)
attributedString.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.link, range: nsRange)
attributedString.addAttribute(NSAttributedString.Key.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: nsRange)
attributedString.addAttribute(NSAttributedString.Key.underlineColor, value: UIColor.blue, range: nsRange)
}

appContact.attributedText = attributedString
Expand Down
3 changes: 1 addition & 2 deletions MoppApp/MoppApp/LicensesCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ class LicensesCell: UITableViewCell {
url.textColor = .link
if let urlText = url.text {
let urlAttributedString = NSMutableAttributedString(string: urlText)
urlAttributedString.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.link, range: NSRange(location: 0, length: urlAttributedString.length))
urlAttributedString.addAttribute(NSAttributedString.Key.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: NSRange(location: 0, length: urlAttributedString.length))

urlAttributedString.addAttribute(NSAttributedString.Key.underlineColor, value: UIColor.blue, range: NSRange(location: 0, length: urlAttributedString.length))

url.attributedText = urlAttributedString

let tapGesture = UITapGestureRecognizer(target: self, action: #selector(handleLinkTap(_:)))
Expand Down

0 comments on commit 88b3c9d

Please sign in to comment.