All Projects → whitesmith → Wstagsfield

whitesmith / Wstagsfield

Licence: mit
An iOS text field that represents tags, hashtags, tokens in general.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Wstagsfield

Tweetextfield
Lightweight set of text fields with nice animation and functionality. 🚀 Inspired by https://uimovement.com/ui/2524/input-field-help/
Stars: ✭ 421 (-58.44%)
Mutual labels:  cocoapods, carthage, swift-package-manager, uitextfield
Multiprogressview
📊 An animatable view that depicts multiple progresses over time. Modeled after UIProgressView
Stars: ✭ 614 (-39.39%)
Mutual labels:  cocoapods, carthage, ui-components
Bfkit Swift
BFKit-Swift is a collection of useful classes, structs and extensions to develop Apps faster.
Stars: ✭ 963 (-4.94%)
Mutual labels:  cocoapods, carthage, swift-package-manager
Fontblaster
Programmatically load custom fonts into your iOS and tvOS app.
Stars: ✭ 1,000 (-1.28%)
Mutual labels:  cocoapods, carthage, swift-package-manager
Openssl
OpenSSL package for SPM, CocoaPod, and Carthage, for iOS and macOS
Stars: ✭ 515 (-49.16%)
Mutual labels:  cocoapods, carthage, swift-package-manager
Swiftframeworktemplate
A template for new Swift iOS / macOS / tvOS / watchOS Framework project ready with travis-ci, cocoapods, Carthage, SwiftPM and a Readme file
Stars: ✭ 527 (-47.98%)
Mutual labels:  cocoapods, carthage, swift-package-manager
Swiftlyext
SwiftlyExt is a collection of useful extensions for Swift 3 standard classes and types 🚀
Stars: ✭ 31 (-96.94%)
Mutual labels:  cocoapods, carthage, swift-package-manager
Taggerkit
🏷 TaggerKit helps you to quickly implement tags in your UIKit apps, so you can go on and test your idea without having to worry about logic and custom collection layouts.
Stars: ✭ 390 (-61.5%)
Mutual labels:  cocoapods, carthage, tags
Zephyr
Effortlessly synchronize UserDefaults over iCloud.
Stars: ✭ 722 (-28.73%)
Mutual labels:  cocoapods, carthage, swift-package-manager
Defaults
Swifty and modern UserDefaults
Stars: ✭ 734 (-27.54%)
Mutual labels:  cocoapods, carthage, swift-package-manager
Sica
🦌 Simple Interface Core Animation. Run type-safe animation sequencially or parallelly
Stars: ✭ 980 (-3.26%)
Mutual labels:  cocoapods, carthage, swift-package-manager
Keyboardshortcuts
Add user-customizable global keyboard shortcuts to your macOS app in minutes
Stars: ✭ 500 (-50.64%)
Mutual labels:  cocoapods, carthage, swift-package-manager
Uitextfield Navigation
🏄‍♂️ UITextField-Navigation makes it easier to navigate between UITextFields and UITextViews
Stars: ✭ 436 (-56.96%)
Mutual labels:  cocoapods, carthage, uitextfield
Sablurimageview
You can use blur effect and it's animation easily to call only two methods.
Stars: ✭ 538 (-46.89%)
Mutual labels:  cocoapods, carthage, swift-package-manager
Preferences
⚙ Add a preferences window to your macOS app in minutes
Stars: ✭ 898 (-11.35%)
Mutual labels:  cocoapods, carthage, swift-package-manager
Guitar
A Cross-Platform String and Regular Expression Library written in Swift.
Stars: ✭ 641 (-36.72%)
Mutual labels:  cocoapods, carthage, swift-package-manager
Anyformatkit
Simple text formatting in Swift
Stars: ✭ 296 (-70.78%)
Mutual labels:  cocoapods, carthage, uitextfield
Functionkit
A framework for functional types and operations designed to fit naturally into Swift.
Stars: ✭ 302 (-70.19%)
Mutual labels:  cocoapods, carthage, swift-package-manager
Koyomi
Simple customizable calendar component in Swift 📆
Stars: ✭ 716 (-29.32%)
Mutual labels:  cocoapods, carthage, ui-components
Statusalert
Display Apple system-like self-hiding status alerts. It is well suited for notifying user without interrupting user flow in iOS-like way.
Stars: ✭ 809 (-20.14%)
Mutual labels:  cocoapods, carthage, swift-package-manager

WSTagsField

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

An iOS text field that represents tags, hashtags, tokens in general.

WSTagsField

Usage

let tagsField = WSTagsField()
tagsField.layoutMargins = UIEdgeInsets(top: 2, left: 6, bottom: 2, right: 6)
tagsField.contentInset = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
tagsField.spaceBetweenLines = 5.0
tagsField.spaceBetweenTags = 10.0
tagsField.font = .systemFont(ofSize: 12.0)
tagsField.backgroundColor = .white
tagsField.tintColor = .green
tagsField.textColor = .black
tagsField.fieldTextColor = .blue
tagsField.selectedColor = .black
tagsField.selectedTextColor = .red
tagsField.delimiter = ","
tagsField.isDelimiterVisible = true
tagsField.placeholderColor = .green
tagsField.placeholderAlwaysVisible = true
tagsField.keyboardAppearance = .dark
tagsField.returnKeyType = .next
tagsField.acceptTagOption = .space
tagsField.shouldTokenizeAfterResigningFirstResponder = true

// Events
tagsField.onDidAddTag = { field, tag in
    print("DidAddTag", tag.text)
}

tagsField.onDidRemoveTag = { field, tag in
    print("DidRemoveTag", tag.text)
}

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

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

tagsField.onValidateTag = { tag, tags in
    // custom validations, called before tag is added to tags list
    return tag.text != "#" && !tags.contains(where: { $0.text.uppercased() == tag.text.uppercased() })
}

print("List of Tags Strings:", tagsField.tags.map({$0.text}))

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"

Then run pod install with CocoaPods 1.8.0 or newer.

Swift Package Manager

Using Xcode 11, just go to "File" > "Swift Packages" > "Add Package Dependency..." and use this repository: https://github.com/whitesmith/WSTagsField.

Manually

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

Requirements

  • iOS 9.0+
  • Xcode 11 (Swift 5.1)

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.

Credits

Whitesmith

This project was inspired by CLTokenInputView.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].