• Stars
    star
    179
  • Rank 214,039 (Top 5 %)
  • Language
    Objective-C
  • License
    Apache License 2.0
  • Created about 9 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

设置页面的封装

ZFSetting

Build Status Cocoapods Compatible Build Status Build Status

每个应用都有设置页面,所以把设置页面封装了一下,可以加快开发效率,简单实用。

效果演示:

image

#Installation with CocoaPods pod 'ZFSetting'

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

__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];

有技术问题也可以加我的iOS技术群,互相讨论,群号为:213376937

期待

  • 如果在使用过程中遇到BUG,或发现功能不够用,希望你能Issues我者微博联系我@任子丰
  • 如果觉得好用请Star!

More Repositories

1

ZFPlayer

Support customization of any player SDK and control layer(支持定制任何播放器SDK和控制层)
Objective-C
7,067
star
2

ZFDownload

断点下载,支持后台下载,再次打开程序、异常退出记录下载进度
Objective-C
408
star
3

ZFZhiHuDaily

知乎日报swift版(精仿)
Objective-C
231
star
4

ZFTabBar

自定义TabBar,可以选中和非选中图片,还可以加badgeValue,双击下拉刷新列表
Objective-C
129
star
5

WXPay

微信支付小讲解
Objective-C
82
star
6

ZFExcelChart

简单的数据展示图表,类似Excel那样分类分级统计数据,并可上下左右滑动查看数据
Objective-C
54
star
7

ZFPhoneTransition

仿qq电话转场动画
Objective-C
41
star
8

ZFNavigationController

播放视频、动画时候,滑动返回不卡顿
Objective-C
35
star
9

ZFTableViewCell

cell左划菜单自定义
Objective-C
23
star
10

ZFLoading

Loading视图动画
Objective-C
16
star
11

Swift-Study

Swift学习:从Objective-C到Swift
12
star
12

FMDB

FMDB小demo,简单实用
Objective-C
5
star
13

RAC_Networking

AFN+RAC封装的网络请求类
Objective-C
5
star
14

ZFNavi

简单的代码模仿网易新闻的炫酷navigationbar
Objective-C
5
star
15

ZFMenuView

类似美团下来框,支持tableView和CollectionView
Objective-C
5
star
16

ZFLoadingView

LoadingView
Objective-C
4
star
17

ZFTimer

每个cell记录一条距离上次刷新的时间
Objective-C
4
star
18

ZFButton

自定义Button,实现文字和图片左右排列好看
Objective-C
3
star
19

RAC_Test

RAC基础,最快上手RAC
Objective-C
2
star
20

renzifeng.github.io

博客
HTML
1
star
21

renzifeng

blog
1
star