MRJTagList 0.2.0.7

MRJTagList 0.2.0.7

YHJ 维护。



MRJTagList 0.2.0.7

  • 余洪江

MRJTagList

CI Status Version License Platform

使用方法

要运行示例项目,请克隆仓库,然后在 Example 目录中首先运行 pod install

需求

安装

YHJTagList 可以通过 CocoaPods 获得。要安装,只需将以下行添加到您的 Podfile 中即可。

pod "MRJTagList"

使用

MRJTagList *listView = [[MRJTagList alloc] initWithFrame:CGRectMake(0, 100, [UIScreen mainScreen].bounds.size.width, 100)];
    listView.tagDelegate = self;
    listView.automaticResize = YES;
    listView.bottomMargin = 10;
    listView.horizontalPadding = 5;
    listView.verticalPadding = 30;
    listView.minimumWidth = 100;
    listView.cornerRadius = 1.0;
    listView.font = [UIFont systemFontOfSize:11];
    listView.textColor = [UIColor orangeColor];
    [listView setTags:@[@"苹果", @"香蕉", @"西瓜", @"大话西游", @"国产零零零七"]];
//    listView.isTouch = NO;
    listView.labelMargin = 10;
    listView.isManySelect = YES;
    [self.view addSubview:listView];
    NSLog(@"-=-==-tagName=%@-=-=-=-tagindex=%ld", tagName, tagIndex);
}

- (void)selectedTag:(NSString *)tagName {
    NSLog(@"-------------selectedTag-%@", tagName);
}

- (void)tagListTagsChanged:(MRJTagList *)tagList {
    NSLog(@"-===0909090-=-=-=-%@", tagList);
}

/**
 *  多标签的代理方法
 *
 *  @param tagNames  多标签的名称
 *  @param tagIndexs 多标签的下标值
 */
- (void)selectedTags:(NSArray *)tagNames tagIndex:(NSArray *)tagIndexs {
    NSLog(@"****************%@________________%@", tagNames, tagIndexs);
}

作者

余洪江, [email protected]

许可

新的使用方法

YHJTagList 在 MIT 许可下可用。更多信息见 LICENSE 文件。