Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@efremidze
Created February 13, 2018 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save efremidze/d41dc25525bdbd387c72e117883ca4a0 to your computer and use it in GitHub Desktop.
Save efremidze/d41dc25525bdbd387c72e117883ca4a0 to your computer and use it in GitHub Desktop.
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