CloudTagView 3.0.0

CloudTagView 3.0.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jan 2018
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Morbix.



CloudTagView

This Pod helps you to create a simple cloud of tags based on Strings. You can manipulate the text, the padding and you can use the tintColor to modify the tag color. There are two delegates to handle taps in the tag: close icon and tag touch. You can access the example project for more details or contacting me.

Requirements

It requires Xcode 8.0+ and Swift 3.0.

Your project deployment target must be iOS 8.0+

For Swift 2.x support, use version 1.1.0

pod 'CloudTagView', '1.1.0'

Usage

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

Installation

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

pod "CloudTagView"

Usage

Basic Usage

Just import CloudTagView and create a instance of CloudTagView. Works with Storyboard too

And append instancies of TagView inside the cloud.

import CloudTagView

class ViewController: UIViewController {

    let cloudView = CloudTagView()

    override func viewDidLoad() {
        super.viewDidLoad()

        cloudView.frame = CGRectMake(0, 20, view.frame.width, 10)
        view.addSubview(cloudView)

        addingTags()
    }

    func addingTags() {
        let normalTags = ["This", "is", "a", "example", "of", "Cloud", "Tag", "View"]

        for s in normalTags {
            cloudView.tags.append(TagView(text: s))
        }
    }
}

Author

Henrique Morbin, [email protected]

License

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