Valentin Shamardin Valentin Shamardin - 1 year ago 165
iOS Question

More button in UILabel like in AppStore any app description

I have a description of myObject and i show it in UILabel. I want to add 'More' button to my

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
to resolve my issue or i have to use

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download