ios ViewController 页面跳转

网友投稿 314 2022-09-05

ios ViewController 页面跳转

从一个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];

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:如何用全国天气预报API接口进行快速开发?天气预报接口应该怎么开通?
下一篇:天气预报接口api,免费天气预报API接口
相关文章

 发表评论

暂时没有评论,来抢沙发吧~