'How to add space between UILabel and Underline in Swift?
I am working on the Swift language. I need to add the label with the underline (like hyperlink). I have added UILabel and added the below 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
But the problem is I need the space between the UILable and the underline. It's not coming for me.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
