BENTagsView 0.9.0

BENTagsView 0.9.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Unclaimed.


Downloads

Total2,441
Week0
Month0

Installs

Apps53
Test Targets3
powered by Segment

GitHub

Stars67
Watchers4
Forks9
Issues1
Contributors2
Pull Requests0

Code

Files4
LOCLines of Code 247


  • By
  • Ben Packard

A simple UIView sublass for displaying a series of tags.

BENTagsView allows you to quickly add a series of tags to any UIView.

Installation

CocoaPods is the recommended method of installing BENTagsView. Simply add the following line to your Podfile:

Podfile

pod 'BENTagsView'

Usage

    //create the tags view
    BENTagsView *tagsView = [[BENTagsView alloc] init];

    //set the tag strings
    tagsView4.tagStrings = @[@"tag one", @"tag two", @"tag three""];        

    //switch some tags on - all others will be off
    NSMutableIndexSet *onIndexes = [NSMutableIndexSet indexSetWithIndex:0];
    [onIndexes addIndex:2];
    [tagsView setOnIndexes:onIndexes];

    //customize on/off colors
    [tagsView setOnColor:[UIColor greenColor]];
    [tagsView setOffColor:[UIColor redColor]];

    //customize font, corner radii
    [tagsView setFont:[UIFont fontWithName:@"Baskerville-BoldItalic" size:16]];
    [tagsView setTagCornerRadius:3];

    //add the view
    [someView addSubview:tagsView];

Demo

Build and run the BENTagsViewDemo project in Xcode to see BENTagsView in action.

Contact

Ben Packard

License

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