Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maximbilan/ios-tag-list

iOS Tag List
https://github.com/maximbilan/ios-tag-list

ios ios-app list objective-c tag ui ui-components ui-kit

Last synced: 2 months ago
JSON representation

iOS Tag List

Awesome Lists containing this project

README

        

iOS Tag List
============

A simple iOS control, the list of tags.


![alt tag](https://raw.github.com/maximbilan/ios_tag_list/master/img/img1.png)
## Using:
Add to your project the next source files:


TagList.h
TagList.m
TagView.h
TagView.m
UIColor+TagColors.h
UIColor+TagColors.m

You can add view in the Interface builder and set class to TagList or create in the code:


TagList *tagList = [[TagList alloc] initWithX:50.0 withY:50.0];
[self.view addSubview:tagList];

For filling data in the tag list, you should create an array and set it into tag list. For example:

NSArray *array = @[@"tag 1", @"tag 2", @"tag 3"];
[self.tagList createTags:array];

Besides that, if you need to handle tap on the tag, you should set selectors. For example:

[self.tagList setTouchTagSelector:@selector(touchTitleTag:)];
[self.tagList setTouchBackgroundSelector:@selector(touchTagOnBackground)];

TouchTagSelector - handle tap on the tag event

TouchBackgroundSelector - handle touches out of the tags event

More details you can find in the project sample.