文章来源:淘论文网   发布者: 毕业设计   浏览量: 27



还可以点击去查询以下关键词:
[设置]    [快速]    [创建]    [静态]    [动态]    [页面]    [ios 快速创建设置静态动态的设置页面]   

项目介绍:

使用方法很简单,继承我的控制器,然后重写czh_setGroup方法,论文,如果满足不了自己的需求,可以自己扩展item然后在frameModel和cell里面书写,如果设置动态在请求完成后在调用czh_setGroup,记得清空数组

- (void)czh_setGroup { [super czh_setGroup]; CZHWeakSelf(self); CZHAvatartem *avatartem = [CZHAvatartem itemWithImageName:nil title:@'头像' canClick:YES]; avatartem.avater = @''; CZHSettingFrameModel *avatarFrameModel = [[CZHSettingFrameModel alloc] init]; avatarFrameModel.item = avatartem; CZHBadgeItem *friendItem = [CZHBadgeItem itemWithImageName:@'mine_friend' title:@'好友' canClick:YES]; friendItem.badge = @'3'; friendItem.descVc = [CZHViewController class]; CZHSettingFrameModel *friendFrameModel = [[CZHSettingFrameModel alloc] init]; friendFrameModel.item = friendItem; CZHFitImageItem *fitItem = [CZHFitImageItem itemWithImageName:@'mine_introduce' title:nil canClick:YES haveLine:YES]; fitItem.descVc = [CZHViewController class]; CZHSettingFrameModel *fitFrameModel = [[CZHSettingFrameModel alloc] init]; fitFrameModel.item = fitItem; //昵称 CZHEditArrowItem *nicknameItem = [CZHEditArrowItem itemWithImageName:nil title:@'昵称' canClick:YES] ; nicknameItem.detail = @'hahaha'; nicknameItem.editCompleteBlock = ^(NSString *inputString) {//编辑完成回调 CZHStrongSelf(self); NSLog(@'---%@', inputString); }; CZHSettingFrameModel *nicknameModel = [[CZHSettingFrameModel alloc] init]; nicknameModel.item = nicknameItem; ///版本号 CZHBaseSettingItem *versionItem = [CZHBaseSettingItem itemWithImageName:nil title:@'版本号' canClick:NO haveLine:YES]; versionItem.detail = [NSString stringWithFormat:@'V%@', [[[NSBundle mainBundle] infoDictionary] objectForKey:@'CFBundleShortVersionString']]; CZHSettingFrameModel *versionModel = [[CZHSettingFrameModel alloc] init]; versionModel.item = versionItem; BOOL isOn = YES; CZHSwitchItem *soldItem = [CZHSwitchItem itemWithImageName:nil title:@'这是开关标题' canClick:YES haveLine:YES]; soldItem.isOn = isOn; soldItem.detail = isOn ? @'打开' : @'关闭'; CZHSettingFrameModel *soldModel = [[CZHSettingFrameModel alloc] init]; soldModel.item = soldItem; soldItem.switchBlock = ^(CZHSwitchItem *item, NSIndexPath *indexPath, BOOL isOn) { CZHStrongSelf(self); item.isOn = !isOn; item.detail = item.isOn ? @'打开' : @'关闭'; soldModel.item = item; [self.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone]; }; //退出 CZHExitItem *exitItem = [CZHExitItem itemWithImageName:nil title:@'退出登录' canClick:YES]; exitItem.operationBlock = ^(CZHBaseSettingItem *item, NSIndexPath *indexPath) { NSLog(@'点击退出登录'); }; CZHSettingFrameModel *exitModel = [[CZHSettingFrameModel alloc] init]; exitModel.item = exitItem; CZHSectionItem *sectionZero = [[CZHSectionItem alloc] init]; sectionZero.headHeight = 20; sectionZero.items = @[avatarFrameModel]; [self.sectionGroups addObject:sectionZero]; CZHSectionItem *sectionOne = [[CZHSectionItem alloc] init]; sectionOne.headHeight = 20; sectionOne.items = @[friendFrameModel, fitFrameModel]; [self.sectionGroups addObject:sectionOne]; CZHSectionItem *sectionTwo = [[CZHSectionItem alloc] init]; sectionTwo.headHeight = 20; sectionTwo.items = @[nicknameModel, versionModel, soldModel]; [self.sectionGroups addObject:sectionTwo]; CZHSectionItem *sectionThree = [[CZHSectionItem alloc] init]; sectionThree.headHeight = 50; sectionThree.items = @[exitModel]; [self.sectionGroups addObject:sectionThree]; }

github地址:https://github.com/jolincheng/CZHSettingController

博客地址:

简书地址:https://www.jianshu.com/p/d972b17d0f2c

开题报告

这里还有:


还可以点击去查询:
[设置]    [快速]    [创建]    [静态]    [动态]    [页面]    [ios 快速创建设置静态动态的设置页面]   

请扫码加微信 微信号:sj52abcd


下载地址: http://www.taolw.com/down/3410.docx
  • 上一篇:高仿网易二毕业设计次元GACHA
  • 下一篇:ios 仿微信限制最大行数,一体键盘