SkillAgentSearch skills...

ZFNavigationController

对NavigationController进行了封装,效果类似天猫客户端和网易新闻客户端导航的控制器

Install / Use

/learn @zhangfeidev/ZFNavigationController
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

#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

View on GitHub
GitHub Stars65
CategoryDevelopment
Updated3y ago
Forks15

Languages

Objective-C

Security Score

80/100

Audited on Nov 22, 2022

No findings