Code Monkey home page Code Monkey logo

tltagscontrol's Introduction

TLTagsControl

A nice and simple tags input control for iOS.

You are able to easily setup different colors for control elements and set different displaying modes

Switching between displaying modes

You are able to switch between displyaing modes by setting the mode property

@property (nonatomic) TLTagsControlMode mode;

######TLTagsControl has two displaying modes:

TLTagsControlModeEdit,

This mode allows user to input new tags and delete tags that are already presented.

In this mode control will look like below:

Screenshot

TLTagsControlModeList,

This mode allows only listing of already presented tags

In this mode control will look like below:

Screenshot

Setting different colors of control elements

You are able to change colors of different element by setting these prperties

@property (nonatomic, strong) UIColor *tagsBackgroungColor;
@property (nonatomic, strong) UIColor *tagsTextColor;
@property (nonatomic, strong) UIColor *tagsDeleteButtonColor;

Applying changes

To apply your changes you should call the method below

- (void)reloadTagSubviews;

######Example:

//assuming tagControl will be set initialized from stroryboard
@interface ViewController ()

@property (nonatomic, strong) IBOutlet TLTagsControl *tagControl;

@end

....

@implementation ViewController

- (void)viewDidLoad {
  [super viewDidLoad];
  
  UIColor *blueBackgroundColor = [UIColor colorWithRed:75.0/255.0 green:186.0/255.0 blue:251.0/255.0 alpha:1];
  UIColor *whiteTextColor = [UIColor whiteColor];
  
  self.tagControl.tagsBackgroungColor = blueBackgroundColor;
  self.tagControl.tagsDeleteButtonColor = whiteTextColor;
  self.tagControl.tagsTextColor = whiteTextColor;
    
  self.tagControl.mode = TLTagsControlModeList;
  
  [self.tagControl reloadTagSubviews];
}

@end

Screenshot

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.