Nandan
Nandan

Reputation: 55

Is there a way to create an attributed string without using NSAttributedString class in swift?

I am working on objective-C to swift conversion. For conversion, I am using String for NSString and Array for NSArray. Similarly, when I try to convert NSAttributedString , I could not find a structure type. Is there any structure type that can be used instead of NSAttributedString class or I must and should use NSAttributedString class itself for the conversion

Upvotes: 0

Views: 52

Answers (1)

LorenzOliveto
LorenzOliveto

Reputation: 7936

The simple answer is no, you can and should use NSAttributedString even if you're writing Swift code.

E.g. As you can see here the property attributedText of UILabel is of type NSAttributedString.

Upvotes: 1

Related Questions