Wednesday, October 28, 2026
HomeiOS Developmentios - How one can add area between UILabel and Underline in...

ios – How one can add area between UILabel and Underline in Swift?

[ad_1]

I’m engaged on the Swift language. Really my requirement is I would like so as to add the label with the underline(like hyperlink). I’ve added UILabel and added the beneath code for underline

let manageTitle = NSAttributedString(string: "Scan in restaurant", attributes: [NSAttributedString.Key.foregroundColor: UIColor.black, NSAttributedString.Key.font: UIFont(font: .medium, size: 14.0), NSAttributedString.Key.underlineStyle: NSUnderlineStyle.single.rawValue])
scanInRestaurantLabel.attributedText = manageTitle

However the issue is I would like the area between the UILable and the underline.It is not coming for me. Can anybody lease do the needful assist right here. Thanks upfront.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments