UIViewController总结 UINavigationController

来源:互联网 发布:英语四级 知乎 编辑:程序博客网 时间:2024/05/17 05:19

一.创建UINavigationController



创建root view controller.

用initWithRootViewController方法创建UINavigationController.

设置window的rootViewController为UINavigationController.


二.隐藏navigationBar



三.Navigation Stack




四.事件流


一般来说用view那套event事件就足够了,一般不需要指定delegate来做操作。

 值得一提的是:你可以用:

 [self.navigationController isMovingFromParentViewController];

 [self.navigationController isMovingToParentViewController];

 来判断viewController是消失还是出现在当前页面中