Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here

WSTagsField

An iOS text field that represents different Tags

Subscribe to updates I use WSTagsField


Statistics on WSTagsField

Number of watchers on Github 681
Number of open issues 18
Average time to close an issue 15 days
Main language Swift
Average time to merge a PR 18 days
Open pull requests 5+
Closed pull requests 5+
Last commit over 1 year ago
Repo Created about 3 years ago
Repo Last Updated over 1 year ago
Size 113 KB
Organization / Authorwhitesmith
Latest Release2.1.2
Contributors1
Page Updated
Do you use WSTagsField? Leave a review!
View open issues (18)
View WSTagsField activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating WSTagsField for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

WSTagsField

Carthage Compatible SwiftPM Compatible CocoaPods Compatible Swift 3.1 Platforms iOS Build Status License MIT

An iOS text field that represents different Tags.

WSTagsField

Usage


let tagsField = WSTagsField()
tagsField.backgroundColor = .white
tagsField.padding = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
tagsField.spaceBetweenTags = 10.0
tagsField.font = .systemFont(ofSize: 12.0)
tagsField.tintColor = .green
tagsField.textColor = .black
tagsField.fieldTextColor = .blue
tagsField.selectedColor = .black
tagsField.selectedTextColor = .red
tagsField.delimiter = ","

// Events
tagsField.onDidAddTag = { (_,_) in
    print("DidAddTag")
}

tagsField.onDidRemoveTag = { (_,_) in
    print("DidRemoveTag")
}

tagsField.onDidChangeText = { _, text in
    print("DidChangeText")
}

tagsField.onDidBeginEditing = { _ in
    print("DidBeginEditing")
}

tagsField.onDidEndEditing = { _ in
    print("DidEndEditing")
}

tagsField.onDidChangeHeightTo = { sender, height in
    print("HeightTo \(height)")
}

Installation

Carthage

To install it, simply add the following line to your Cartfile:

github "whitesmith/WSTagsField"

Then run carthage update.

Follow the current instructions in Carthage's README for up to date installation instructions.

CocoaPods

To install it, simply add the following line to your Podfile:

pod "WSTagsField"

You will also need to make sure you're opting into using frameworks:

use_frameworks!

Then run pod install with CocoaPods 1.1.0.beta.1 or newer.

SwiftPM

If your version of Swift supports the SPM, you just need to add WSTagsField as a dependency in your Package.swift:

let package = Package(
    name: "YOUR_PROJECT_NAME",
    dependencies: [
        .Package(url: "https://github.com/whitesmith/WSTagsField.git", , versions: "2.0.0" ..< Version.max),
        ...
    ]
    ...
)

(Note that the Swift Package Manager is still in early design and development, for more infomation checkout its repository)

Manually

Download all the source files and drop them into your project.

Requirements

  • iOS 8.0+
  • Xcode 8 (Swift 3.0)

Contributing

The best way to contribute is by submitting a pull request. We'll do our best to respond to your patch as soon as possible. You can also submit a new GitHub issue if you find bugs or have questions. :octocat:

Credits

Whitesmith

This project was heavily inspired by CLTokenInputView.

WSTagsField open issues Ask a question     (View All Issues)
  • almost 3 years Question about future?
WSTagsField open pull requests (View All Pulls)
  • Infer UIFont
  • Fix `repositionViews()` infinite loop when using AutoLayout on a UITableViewCell
  • Tag acception option
  • Add tag id and isSelectedToBeRemoved properties
  • Fix layout in table view
WSTagsField list of languages used
WSTagsField latest release notes
2.1.2 v2.1.2 (Swift 3.0)
  • Fix #37: use WSTagsField in a static TableViewController Cell.
2.1.1 v2.1.1 (Swift 3.0)
  • Fix #39: solve retain cycle
  • Fix #31: Traits and autocorrection (ty @danielrhodes)
1.2.5 v1.2.5 (Swift 2.2)
  • Fix #39: solve retain cycle.
More projects by whitesmith View all
Other projects in Swift