GithubHelp home page GithubHelp logo

alanjrogers / oextokenfield Goto Github PK

View Code? Open in Web Editor NEW

This project forked from octiplex/oextokenfield

0.0 0.0 0.0 97 KB

A subclass of NSTokenField that allows token customization.

License: Other

Objective-C 96.84% Ruby 3.16%

oextokenfield's Introduction

Introduction

OEXTokenField is a subclass of NSTokenField that allows token customization.

How to use

NSTokenField tokens rely on text attachments, which are drawn by instances of NSTextAttachmentCell. OEXTokenField works by subsituting the default text attachment cells as they are inserted with cells provided by its delegate.

In order to provide custom token cells, you just need to implement the following delegation method:

- (NSTextAttachmentCell *)tokenField:(OEXTokenField *)tokenField attachmentCellForRepresentedObject:(id)representedObject;

Any instance of NSTextAttachmentCell is fine. However, if you want to display tokens that look identical or similar to AppKit tokens, you may use and subclass the OEXTokenAttachmentCell class.

Known issues

For the moment, OEXTokenField doesn't provide menus for represented objects that display custom attachment cells.

Source Code

The OEXTokenField code is available from GitHub:

https://github.com/octiplex/OEXTokenField.git

License

OEXTokenField is made available under the Revised BSD License. See the LICENSE file for more info.

oextokenfield's People

Contributors

alanjrogers avatar baarde 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.