ios界面跳转问题,两种方式解决
2014-03-01 23:57
337 查看
从一个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];
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的两种界面跳转方式
- Android在界面中重复点击导致多次跳转或打开多个相同界面的问题的解决方式
- ios的两种界面跳转方式
- ios的两种界面跳转方式
- Android欢迎界面延迟跳转两种方式
- 关于Cocos2d-x 3.0正式版 粒子问题在IOS上正常显示,在Android下有问题的解决方式
- 一套代码解决ios的所有界面适配问题
- ios--解决键盘遮挡UITextField控件的问题(方式二)
- 解决Cordova开发iOS的app界面被状态栏覆盖的问题
- IOS界面跳转的两种方法
- 约瑟夫环问题(幸运数字),数组和集合两种方式解决
- iOS锁屏问题解决方式
- storyboard设置hidesBottomBarWhenPushed时 界面跳转时tabbar会延迟一下再消失问题解决 以及设置后跳转navBar显示问题
- iOS开发--利用 runtime,解决多次点击相同 button,导致重复跳转的问题
- 如何解决iOS界面操作导致导致NSTimer暂停计时的问题?
- 两种方式解决并发问题
- 解决 iOS 设备上html链接要点击两次才跳转的问题
- java中调用本地动态链接库(*.DLL)的两种方式详解和not found library、打包成jar,war包dll无法加载等等问题解决办法