I have a comments section in my app, where users can tag their friends. When loading the comments into the table view, I need to parse through each comment to see if it contains the @
signal for a tagged friend, then get that substring and convert it to a UIButton
that segues to the user's profile.
I already have textLabel?.text
as String?
, but I'm unsure of how to convert a substring of String?
to a UIButton
. Do I have to use an attributed string?