Created
February 13, 2018 01:23
-
-
Save efremidze/d41dc25525bdbd387c72e117883ca4a0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ActiveLabel | |
class ViewController: UIViewController { | |
lazy var footerView: UIView = { | |
let label = ActiveLabel() | |
label.customize { label in | |
label.text = "Tap me" | |
label.textAlignment = .center | |
let customType = ActiveType.custom(pattern: "\\bTap me\\b") | |
label.enabledTypes = [customType] | |
label.customColor[customType] = .gray | |
label.customSelectedColor[customType] = .lightGray | |
label.handleCustomTap(for: customType) { element in print("tapped") } | |
} | |
label.frame.size.width = self.view.frame.width | |
label.frame.size.height = 44 | |
return label | |
}() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment