I have a description of myObject and i show it in UILabel. I want to add 'More' button to my UILabel
if a description is too long. On Github i have found TTTAttributedLabel which allows to use hyperlinks. The question is, is there some special features in UILabel
or UITextView
to resolve my issue or i have to use TTTAttributedLabel
?
The best option is certainly to use TTTAttributedLabel
.
UILabel
and UITextView
are designed simply for showing static text. There is no method for adding tappable elements.
As an alternative, before I leaned of TTTAttributedLabel
I simply placed a UIButton
with a custom style over my UILabel
. The button was invisible but still responded to taps. This works best for static text though, as the button needs to be placed correctly on the interface to cover the correct part of the text.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With