Konstantin.Efimenko
Konstantin.Efimenko

Reputation: 1450

Is it possible to attach some Action on tap on selected range of AttributedString?

There is a possibility to open link by tapping some part of AttributedString like this:

var string = AttributedString(text)
string[range].link = url
string[range].foregroundColor = .blue
string[range].underlineStyle = .single

I wanted to ask if there is some way to attach any other action to a specific range of AttributedString to open e.g. some specific screen of the application.

Upvotes: 0

Views: 27

Answers (0)

Related Questions