IOS 设置页面的封装 ZFSetting

码农软件 · 软件分类 · 其他(Others) · 2019-07-17 10:58:54

软件介绍

ZFSetting 封装了基本的设置页面功能项。

演示效果:

image

用法示例:

用法:直接继承ZFBaseSettingViewController,创建UIViewController的类,实现以下方法就可以实现设置页面的显示。

初始化Item:

__weak typeof(self) weakSelf = self;
// 初始化Item
ZFSettingItem *help = [ZFSettingItem itemWithIcon:@"MoreHelp" title:@"帮助" type:ZFSettingItemTypeArrow];
//cell点击事件的block回调
help.operation = ^{
    UIViewController *helpVC = [[UIViewController alloc] init];
    helpVC.view.backgroundColor = [UIColor grayColor];
    helpVC.title = @"帮助";
    [weakSelf.navigationController pushViewController:helpVC animated:YES];
};
ZFSettingItem *shake = [ZFSettingItem itemWithIcon:@"sound_Effect" title:@"声音提示" type:ZFSettingItemTypeSwitch];
//开关事件
shake.switchBlock = ^(BOOL on) {
    NSLog(@"声音提示%zd",on);
};

cell的设置:

ZFSettingGroup *group = [[ZFSettingGroup alloc] init];
group.header = @"高级设置";
group.footer = @"这是footer";
group.items = @[ help, share , about];
[_allGroups addObject:group];

期待:

  • 如果在使用过程中遇到BUG,或发现功能不够用,希望你能Issues我

  • 如果觉得好用请Star!

  • 谢谢!

本文地址:https://www.codercto.com/soft/d/10320.html

Programming Computer Vision with Python

Programming Computer Vision with Python

Jan Erik Solem / O'Reilly Media / 2012-6-22 / USD 39.99

If you want a basic understanding of computer vision's underlying theory and algorithms, this hands-on introduction is the ideal place to start. As a student, researcher, hacker, or enthusiast, you'll......一起来看看 《Programming Computer Vision with Python》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

html转js在线工具
html转js在线工具

html转js在线工具