What is the IGLabel?
The IGLabel is an iOS control for creating rich text labels. It works similarly to the generic UILabel and applies styles to text in a similar fashion that is done when using attributed strings. It is also based on Core Text to boost performance and functionality over the generic UILabel.
What is Tappable Content?
Tappable content is series of characters, words or sentences that allow interaction by tapping them. The IGLabel allows this interaction by setting an attribute over a matching regular expression or specific text location. When tappable content is tapped using the IGLabel, the labelTap:tapText:tapValue IGLabelDelegate method is called. This method provides the label tapped, the text receiving the tap and the value applied to the text through the styling attribute.
How Do I Create Tappable Content?
The first step in creating tappable content is to set the text property on an instance of the IGLabel.
Next create an NSDictionary containing the tap attribute. Any NSObject can be used for the tap attribute.
Finally, add the attributes dictionary to the IGLabel.
Once the attribute has been added to the IGLabel, the text "tappable content" can be tapped.
[custom] width="400" height="600" src="https://appetize.io/embed/5z44ep6xc5jnvv5anzjbb6v34g" [/custom]
Where Can I Learn More?
The reference links below provide more information about the IGLabel and the styling aspects it supports.