Code Monkey home page Code Monkey logo

partagpicker's Introduction

PARTagPicker

This pod provides a view controller for choosing and creating tags in the style of wordpress or tumblr. This tag picker was originally used in the Intrepid Pursuits app, Slate.

DEMO

As used in Slate:

DEMO IN SLATE DEMO IN SLATE

From example project:

DEMO IN EXAMPLE DEMO IN EXAMPLE

Installation

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

pod 'PARTagPicker'

Usage

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

Include #import <PARTagPicker/PARTagPickerViewController.h>.

The basic setup is to create an instance of PARTagPickerViewController, add it's view, and then add the controller as a child view controller.

The tags are passed in as NSString objects in an array. Anytime you change the allTags array, any existing chosenTags are updated to use references to the new strings if they contain a match in the updated array. Otherwise they continue to point to the old strings.

Options

  • You can customize colors using a PARTagColorReference object.
  • You can allow new tags with allowsNewTags boolean property on the controller.
  • You can set the chosenTags directly.
  • Delegate methods for when the chosenTags change and the tag picker changes size.
  • - (void)tagPicker:(PARTagPickerViewController *)tagPicker visibilityChangedToState:(PARTagPickerVisibilityState)state
  • - (void)chosenTagsWereUpdatedInTagPicker:(PARTagPickerViewController *)tagPicker

Notes

This is still a work in progress. If you have suggestions or run into issues, please create an issue on git or tweet me @ThePaulRolfe.

Updates

  • v1.0.2 - Including .xibs in the pod now. Oops!
  • v1.0.0 - Added documentation and fixed bug with deselecting chosenTags. Added ability to use custom fonts in the tag cells.
  • v0.0.5 - Added expected functionality of chosenTags being removed when pressed.

Author

Paul Rolfe, [email protected], @ThePaulRolfe

License

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

partagpicker's People

Contributors

paulrolfe avatar

Watchers

Jignesh Fadadu 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.