CocoaPods trunk is moving to be read-only. Read more on the blog, there are 17 months to go.
TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Aug 2015 |
Maintained by shiweifu.
使用 View 实现的 Tag视图,不用再使用CollectionView
时过境迁,因为性能和复用性的考虑,本库去掉使用AutoLayout来实现,如果你想使用AutoLayout版,可以使用这个:https://github.com/zsk425/SKTagView
- (void)setupTagView
{
NSArray *texts = @[ @"A", @"Short", @"Button", @"Longer Button", @"Very Long Button", @"Short", @"More Button", @"Any Key"];
[texts enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop)
{
SFTag *tag = [SFTag tagWithText:obj];
tag.textColor = [UIColor blackColor];
tag.bgColor = [UIColor yellowColor];
[self.tagView addTag:tag];
}];
[self.view addSubview:self.tagView];
[self.tagView autoCenterInSuperview];
[self.tagView autoSetDimension:ALDimensionWidth toSize:220];
}
详情见图: