NavigationController

Navigation Controller以一个栈的形式维护VC,通过pushViewController入栈,popViewController出栈。

页面分几部分:Navigation bar, Custom Content和Navigation toolbar

NavigationController_第1张图片

1.Navigation bar


1.简单实用

UIBarButtonItem *leftButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(selectLeftAction:)];

self.navigationItem.leftBarButtonItem = leftButton;

UIBarButtonItem *rightButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd  target:self action:@selector(selectRightAction:)];

self.navigationItem.rightBarButtonItem = rightButton;

2.还有一些系统提供的自定义风格的button形式,详细内容

3.titleView

titleView可以替换成button,或者SegmentedControl,具体方法参见

2.Navigation toolbar


toolbar使用

hidesBottomBarWhenPushed


http://blog.csdn.net/holydancer/article/details/8097585

你可能感兴趣的:(NavigationController)