CocoaPods trunk is moving to be read-only. Read more on the blog, there are 9 months to go.

VOInteractiveLabel 0.0.3

VOInteractiveLabel 0.0.3

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Sep 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Val Osipenko.



  • By
  • valosip

VOInteractiveLabel

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.