iOS学习之UINavigationController 1
iOS学习之UINavigationController 2
iOS学习之UINavigationController 3
[self.navigationController setNavigationBarHidden:YES animated:YES];
从一个Controller跳转到另一个Controller时,一般有以下2种:
1、利用UINavigationController,调用pushViewController,进行跳转;这种采用压栈和出栈的方式,进行Controller的管理。调用popViewControllerAnimated方法可以返回。
PickImageViewController *ickImageViewController = [[PickImageViewController alloc] init];
[self.navigationController pushViewController: ickImageViewController animated:true];
[ickImageViewController release];
2、利用UIViewController自身的presentModalViewController,进行跳转;调用dismissModalViewControllerAnimated方法可以返回。
PickImageViewController *ickImageViewController = [[PickImageViewController alloc] init];
[self presentModalViewController:ickImageViewController animated:YES];
//返回
[self dismissModalViewControllerAnimated:YES];

本文详细介绍了iOS中UINavigationController的使用方法,包括如何隐藏UINavigationBar,以及两种常见的控制器跳转方式:利用UINavigationController进行压栈和出栈管理,以及利用UIViewController的presentModalViewController进行模态视图控制器展示。
4333

被折叠的 条评论
为什么被折叠?



