Souljacker
Souljacker

Reputation: 774

Token in UITableViewCell

I want to recreate this token in my UITableViewCell. I want it to be so if it detects something with an @ in the cell.textLabel.text string using Regex. It will automatically highlight that with a token like the one below.

Also it should be tappable.

I want to create something like this!

Upvotes: 2

Views: 143

Answers (1)

chockenberry
chockenberry

Reputation: 7991

Use CoreText to determine the bounding box and then use that information while drawing the cell's view.

Upvotes: 1

Related Questions