Skip to content

Latest commit

 

History

History
79 lines (62 loc) · 2.69 KB

File metadata and controls

79 lines (62 loc) · 2.69 KB

VOInteractiveLabel

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Introduction

VOInteractiveLabel example

Usage

import VOInteractive
class ViewController: UIViewController, VOInteractiveLabelDelegate {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        myLabel = FillInBlankLabel3()
        myLabel.delegate = self
        myLabel.text = "My name is enter name here"
        myLabel.blankArray.append(FillInBlankModel1(type: .string, 
                                    text: "enter name here", 
                                    hint: "Please enter your name", 
                                    placeholder: "Name", 
                                    attributes: [NSForegroundColorAttributeName: UIColor.black,
                                                NSUnderlineColorAttributeName: UIColor.black,
                                                NSUnderlineStyleAttributeName: NSUnderlineStyle.styleSingle.rawValue]))

        self.view.addSubview(myLabel)
        myLabel.setupLabelAttributes()
    }
    
    // MARK: - VOInteractiveLabel 
    func clickedOnLinkAtIndex(_ index: Int, inLabel label: FillInBlankLabel3) {
        print("Clicked on link")
    }
    func clickedOnBlankAtIndex(_ index: Int, inLabel label: FillInBlankLabel3) {
        print("Clicked on blank")
    }
    func clickedOnHashtagAtIndex(_ index: Int, inLabel label: FillInBlankLabel3) {
        print("Clicked on hashtag")
    }
    func clickedOnMentionAtIndex(_ index: Int, inLabel label: FillInBlankLabel3) {
        print("Clicked on mention")
    }
}

Requirements

iOS 7+

Installation

VOInteractiveLabel is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "VOInteractiveLabel"

Changelog

0.0.3

  • Additional documentation

0.0.2

  • Add documentation and screenshots

0.0.1

  • Initial beta release

License

VOInteractiveLabel is available under the MIT license. See the LICENSE file for more info.