- 本框架中的 SGTagsView 设计来源于 SGPagingView 框架中的 SGPageTitleView
视图 | 注释 |
---|---|
SGActionSheet | 弹窗 |
SGCycleScrollView | 文字、图片轮播 |
SGPopupMenu | 弹框菜单 |
SGItemsView | item视图 |
SGTagsView | 标签视图 |
SGTextView | placeholder、placeholderColor、limitNumber |
视图 | 注释 |
---|---|
SGLabel | 文字从左上方开始布局 |
SGTextView | placeholder、placeholderColor、limitNumber |
SGTagsView | 标签视图 |
SGItemsView | item视图 |
SGActionSheet | 底部弹窗视图(微信、微博样式) |
SGGuidePageView | 引导页 |
SGTagsViewConfigure *configure = [SGTagsViewConfigure configure];
NSArray *tags = @[@"iPhone 8", @"iPhone 8P", @"iPhone X", @"iPhone XR", @"iPhone XS", @"iPhone XS Max"];
SGTagsView *tagsView = [SGTagsView tagsViewWithFrame:CGRectMake(0, 100, self.view.frame.size.width, 50) configure:configure];
tagsView.tags = tags;
[self.view addSubview:tagsView];
tagsView.singleSelectBlock = ^(SGTagsView * _Nonnull tagsView, NSString *tag, NSInteger index) {
NSLog(@"%@ - - %ld", tag, index);
};
SGActionSheetConfigure *asc = [SGActionSheetConfigure configure];
SGActionSheet *as = [[SGActionSheet alloc] initWithOtherTitles:@[@"确定"] configure:asc];
as.otherTitleClickBlock = ^(NSInteger index) {
NSLog(@"index - - %ld", index);
};
[as actionSheet];