Questions tagged [attributed]

6 questions
1
vote
2 answers

Attributed String in Swift

I'm trying to autocomplete emails. I've done the autocomplete part, but I want to use some properties in strings. For example, after typing the user's e-mail address and making @g, I want to show a different background color of the mail.com section.…
0
votes
0 answers

Swift unit tests for attributed string

I want to create a unit test for an attributed string. Here is my code func setupMyLabel() { myLabel.isHidden = false let attributes = [NSAttributedString.Key.font: Style.FontBook.bold, …
0
votes
2 answers

How to Create Label Doted Underline in Swift

I Want to doted underline on label in Swift
0
votes
0 answers

Updating Attributed String Without Losing Previous Formatting

For the first time, I am working with attributed strings so please bear with me! I have spent a lot of time on SO looking at various attributed string answers but I'm still not convinced I am doing the right thing and would appreciate any advice. I…
0
votes
0 answers

Find and replace characters in attributed string with attributes?

I am facing an issue with replacing some characters in an attributed string with some attributed characters. let replaceString = NSMutableAttributedString(string: playerNames[index], attributes:…
Stefan Me
  • 5
  • 4
0
votes
1 answer

Attributed UILabel with Variation resets text after app was sent to background

I'm using an attributed UILabel with Regular x Regular variation. See the following screenshot: In my view controller I'm setting a text value for the UILabel: class ViewController: UIViewController { // MARK: - Outlets @IBOutlet weak var…
iOS Dev
  • 4,143
  • 5
  • 30
  • 58