To run the example project, clone the repo, and run pod install
from the Example directory first.
Using TappableLabel should be quite intuitive. All you need to do, is import TappableLabel
, and all your UILabel objects will gain automatic link detection.
Here is an example:
import TappableLabel
let myLabel = UILabel()
// set up the label using NSAttributedString
myLabel.addLinkDetection { url in
UIApplication.shared.open(url)
}
TappableLabel is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'TappableLabel'
Vid Tadel
TappableLabel is available under the MIT license. See the LICENSE file for more info.