Giter VIP home page Giter VIP logo

wstagsfield's Introduction

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

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.

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.

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's People

Contributors

ricardopereira avatar basthomas avatar brnunes avatar canaksoy avatar danielrhodes avatar 128keaton avatar devswi avatar

Watchers

James Cloos avatar Ahmer Baig avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.