一款简单易用的标签自定义框架
NSArray *test = @[@"#蓝天#", @"#铎哥#", @"#Test#", @"#www.xsd.me#", @"#极客小哆#"];
XSDTagView *tagView = [[XSDTagView alloc] initWithTagArray:test];
NSArray *test = @[@"#蓝天#", @"#铎哥#", @"#Test#", @"#www.xsd.me#", @"#极客小哆#"];
XSDTagView *tagView = [[XSDTagView alloc] init];
tagView.tagArray = test;
tagView.delegate = self; // <XSDTagViewDelegate>
/**
* 标签被点击时
*/
- (void)tagView:(XSDTagView *)tagView didSelectRowAtIndex:(NSInteger)index tagName:(NSString *)tagName;
/**
* 标签被长按时
*/
- (void)tagView:(XSDTagView *)tagView didLongTouchRowAtIndex:(NSInteger)index tagName:(NSString *)tagName;
/**
* 标签的删除按钮被点击时
*/
- (void)tagView:(XSDTagView *)tagView didClickCloseBtnAtIndex:(NSInteger)index;
/**
* 点击添加按钮时响应
*/
- (void)tagView:(XSDTagView *)tagView didClickAddBtnWithTagArray:(XSDTagArray *)tagArray;
/**
* 返回tagView的总高度
*/
- (void)tagView:(XSDTagView *)tagView tagViewHeight:(CGFloat)tagViewHeight;
作者:** xsdCoder **
博客:www.xsd.me