#ZFNavigationController ##简介 很喜欢天猫和网易新闻的导航控制器的pop效果,于是封装了一个相同的pop效果。将自定义的navigationBar作为了viewcontroller的属性。第一版封装得比较简单,后期再深度封装一下。当然我只是抛砖引玉,希望喜欢这个效果的朋友们拿去自己DIY吧! ##效果 ##使用方法
首先将ZFNavigationController文件夹拖入工程中,在AppDelegate中设置你的导航控制器。
ViewController *viewVC = [[ViewController alloc] init];
ZFNavigationController *nav = [[UINavigationController alloc] initWithRootViewController:viewVC];
self.window.rootViewController = nav;
- 开启全屏返回手势
nav.fullScreenPopGesture = YES;
- 设置viewcontroller的title
self.title = @"首页";
- viewcontroller隐藏navigationBar
self.navigationBarHidden = YES;
如果是storyboard,使用User Defined Runtime Attributes
博客地址:小飞的技术博客,欢迎star! ##License MIT