TouchHandlerLabel
使用方法
let label = TouchHandlerLabel()
let simpleTextHandler = SimpleTextTouchHandler(text: "text") { (_, str) in
print("Simple text:", str)
}
label.text = "Test text"
simpleTextHandler.normalColor = UIColor.red
simpleTextHandler.selectedColor = UIColor.red.withAlphaComponent(0.5)
label.add(touchHandler: simpleTextHandler)
更多例子可以在 TouchHandlerLabelExample 中找到
CocoaPods
pod 'TouchHandlerLabel'