How to convert between NSAttributedString and AttributedString

SwiftUI lacks the support for the old NSAttributedString but fully supports this new type. On the other hand, UIKit supported NSAttributedString but lacked the support of AttributedString in most APIs. Learn how to convert between the two, so you can use any of them in the platform you want.

How to use AttributedString in UIKit

Learn how to use the new AttributedString inside UIKit components.

What are Character and Run in AttributedString

Learn about the two important views in AttributedString, characters, and run.

AttributedString in iOS 15

Learn a new improvement struct of an NSAttributedString.

NSAttributedString in SwiftUI

Find out what is the SwiftUI way of styling portions of text.

See all tags.