ActiveLabel

@IBDesignable
open class ActiveLabel : UILabel

Undocumented

  • Undocumented

    Declaration

    Swift

    @IBInspectable
    var isSelectable: Bool
  • Undocumented

    Declaration

    Swift

    override open var canBecomeFirstResponder: Bool { get }
  • Undocumented

    Declaration

    Swift

    override open func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool
  • Undocumented

    Declaration

    Swift

    override open func copy(_ sender: Any?)
  • Undocumented

    Declaration

    Swift

    open weak var delegate: ActiveLabelDelegate?
  • Undocumented

    Declaration

    Swift

    open var enabledTypes: [ActiveType]
  • Undocumented

    Declaration

    Swift

    open var urlMaximumLength: Int?
  • Undocumented

    Declaration

    Swift

    open var configureLinkAttribute: ConfigureLinkAttribute?
  • Undocumented

    Declaration

    Swift

    @IBInspectable
    open var mentionColor: UIColor { get set }
  • Undocumented

    Declaration

    Swift

    @IBInspectable
    open var mentionSelectedColor: UIColor? { get set }
  • Undocumented

    Declaration

    Swift

    @IBInspectable
    open var hashtagColor: UIColor { get set }
  • Undocumented

    Declaration

    Swift

    @IBInspectable
    open var hashtagSelectedColor: UIColor? { get set }
  • Undocumented

    Declaration

    Swift

    @IBInspectable
    open var URLColor: UIColor { get set }
  • Undocumented

    Declaration

    Swift

    @IBInspectable
    open var URLSelectedColor: UIColor? { get set }
  • Undocumented

    Declaration

    Swift

    open var customColor: [ActiveType : UIColor] { get set }
  • Undocumented

    Declaration

    Swift

    open var customSelectedColor: [ActiveType : UIColor] { get set }
  • Undocumented

    Declaration

    Swift

    @IBInspectable
    public var lineSpacing: CGFloat { get set }
  • Undocumented

    Declaration

    Swift

    @IBInspectable
    public var minimumLineHeight: CGFloat { get set }
  • Undocumented

    Declaration

    Swift

    @IBInspectable
    public var highlightFontName: String? { get set }
  • Undocumented

    Declaration

    Swift

    public var highlightFontSize: CGFloat? { get set }
  • Undocumented

    Declaration

    Swift

    private var hightlightFont: UIFont? { get }
  • Undocumented

    Declaration

    Swift

    open func handleMentionTap(_ handler: @escaping (String) -> ())
  • Undocumented

    Declaration

    Swift

    open func handleHashtagTap(_ handler: @escaping (String) -> ())
  • Undocumented

    Declaration

    Swift

    open func handleURLTap(_ handler: @escaping (URL) -> ())
  • Undocumented

    Declaration

    Swift

    open func handleCustomTap(for type: ActiveType, handler: @escaping (String) -> ())
  • Undocumented

    Declaration

    Swift

    open func removeHandle(for type: ActiveType)
  • Undocumented

    Declaration

    Swift

    open func filterMention(_ predicate: @escaping (String) -> Bool)
  • Undocumented

    Declaration

    Swift

    open func filterHashtag(_ predicate: @escaping (String) -> Bool)
  • Undocumented

    Declaration

    Swift

    override open var text: String? { get set }
  • Undocumented

    Declaration

    Swift

    override open var attributedText: NSAttributedString? { get set }
  • Undocumented

    Declaration

    Swift

    override open var font: UIFont! { get set }
  • Undocumented

    Declaration

    Swift

    override open var textColor: UIColor! { get set }
  • Undocumented

    Declaration

    Swift

    override open var textAlignment: NSTextAlignment { get set }
  • Undocumented

    Declaration

    Swift

    open override var numberOfLines: Int { get set }
  • Undocumented

    Declaration

    Swift

    open override var lineBreakMode: NSLineBreakMode { get set }
  • Undocumented

    Declaration

    Swift

    override public init(frame: CGRect)
  • Undocumented

    Declaration

    Swift

    required public init?(coder aDecoder: NSCoder)
  • Undocumented

    Declaration

    Swift

    open override func awakeFromNib()
  • Undocumented

    Declaration

    Swift

    open override func drawText(in rect: CGRect)
  • Undocumented

    Declaration

    Swift

    @discardableResult
    open func customize(_ block: (_ label: ActiveLabel) -> ()) -> ActiveLabel
  • Undocumented

    Declaration

    Swift

    open override var intrinsicContentSize: CGSize { get }
  • Undocumented

    Declaration

    Swift

    func onTouch(_ touch: UITouch) -> Bool
  • Undocumented

    Declaration

    Swift

    fileprivate var _customizing: Bool
  • Undocumented

    Declaration

    Swift

    fileprivate var defaultCustomColor: UIColor
  • Undocumented

    Declaration

    Swift

    internal var mentionTapHandler: ((String) -> ())?
  • Undocumented

    Declaration

    Swift

    internal var hashtagTapHandler: ((String) -> ())?
  • Undocumented

    Declaration

    Swift

    internal var urlTapHandler: ((URL) -> ())?
  • Undocumented

    Declaration

    Swift

    internal var customTapHandlers: [ActiveType : ((String) -> ())]
  • Undocumented

    Declaration

    Swift

    fileprivate var mentionFilterPredicate: ((String) -> Bool)?
  • Undocumented

    Declaration

    Swift

    fileprivate var hashtagFilterPredicate: ((String) -> Bool)?
  • Undocumented

    Declaration

    Swift

    fileprivate var selectedElement: ElementTuple?
  • Undocumented

    Declaration

    Swift

    fileprivate var heightCorrection: CGFloat
  • Undocumented

    Declaration

    Swift

    internal lazy var textStorage: NSTextStorage { get set }
  • Undocumented

    Declaration

    Swift

    fileprivate lazy var layoutManager: NSLayoutManager { get set }
  • Undocumented

    Declaration

    Swift

    fileprivate lazy var textContainer: NSTextContainer { get set }
  • Undocumented

    Declaration

    Swift

    lazy var activeElements: [ActiveType : [ElementTuple]] { get set }
  • Undocumented

    Declaration

    Swift

    fileprivate func setupLabel()
  • Undocumented

    Declaration

    Swift

    fileprivate func updateTextStorage(parseText: Bool = true)
  • Undocumented

    Declaration

    Swift

    fileprivate func clearActiveElements()
  • Undocumented

    Declaration

    Swift

    fileprivate func textOrigin(inRect rect: CGRect) -> CGPoint
  • add link attribute

    Declaration

    Swift

    fileprivate func addLinkAttribute(_ mutAttrString: NSMutableAttributedString)
  • use regex check all link ranges

    Declaration

    Swift

    fileprivate func parseTextAndExtractActiveElements(_ attrString: NSAttributedString) -> String
  • add line break mode

    Declaration

    Swift

    fileprivate func addLineBreak(_ attrString: NSAttributedString) -> NSMutableAttributedString
  • Undocumented

    Declaration

    Swift

    fileprivate func updateAttributesWhenSelected(_ isSelected: Bool)
  • Undocumented

    Declaration

    Swift

    fileprivate func element(at location: CGPoint) -> ElementTuple?
  • Undocumented

    Declaration

    Swift

    open override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?)
  • Undocumented

    Declaration

    Swift

    open override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?)
  • Undocumented

    Declaration

    Swift

    open override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?)
  • Undocumented

    Declaration

    Swift

    open override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?)
  • Undocumented

    Declaration

    Swift

    fileprivate func didTapMention(_ username: String)
  • Undocumented

    Declaration

    Swift

    fileprivate func didTapHashtag(_ hashtag: String)
  • Undocumented

    Declaration

    Swift

    fileprivate func didTapStringURL(_ stringURL: String)
  • Undocumented

    Declaration

    Swift

    fileprivate func didTap(_ element: String, for type: ActiveType)