Skip to content

Simple but highly customizable iOS tag list view, in Swift.

License

Notifications You must be signed in to change notification settings

yangaiche/TagListView

 
 

Repository files navigation

TagListView

Version License

Simple but highly customizable iOS tag list view, in Swift. The APIs are not stable before 1.0.

Supports Storyboard, Auto Layout, and @IBDesignable.

Screenshot

Usage

The most convinient way is to use Storyboard, where you can set the attributes right in the Interface Builder. With @IBDesignable, you can see the preview in real time.

Interface Builder

You can add tag to the tag list view, or set custom font through code:

tagListView.textFont = UIFont.systemFontOfSize(24)

tagListView.addTag("TagListView")

tagListView.removeTag("meow") // all tags with title “meow” will be removed
tagListView.removeAllTags()

You can implement TagListViewDelegate to receive tag pressed event:

// ...
{
    // ...
    tagListView.delegate = self
    // ...
}

func tagPressed(title: String) {
    println("Tag pressed: \(title)")
}

Installation

Use CocoaPods:

pod 'TagListView'

Or drag TagListView folder into your project.

Contribution

Pull requests are welcome! If you want to do something big, please open an issue to let me know first.

License

MIT

About

Simple but highly customizable iOS tag list view, in Swift.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 95.6%
  • Ruby 4.4%