Skip to content

URL Link selected font  #425

Open
Open
@nikeshakya

Description

@nikeshakya

I have customized label to have bold font for url links
It works for the first time, but after the link is clicked, the font attribute just invalidates for link...it changes back to normal font

here is my implementation:

self.configureLinkAttribute =  { (type, attributes, isSelected) in
            var atts = attributes
            switch type {
            case .url:
                if self.underlineLink {
                    atts[NSAttributedString.Key.underlineStyle] = NSUnderlineStyle.thick.rawValue
                }
                if let font = self.linkFont {
                    atts[NSAttributedString.Key.font] = font
                }
                break
            default:
                atts[NSAttributedString.Key.underlineStyle] = 0
                break
            }
            return atts
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions