当前位置:首页 > 操作系统 > Ios

IOS界面切换

  好吧!表示这几天要实现  phonegap 打开IOS原生界面,因此也查询了一些方案。

有如下几种:

第一种:navigationcontroller

//进入下层
[self.navigationControllerpushViewController:subTableViewController  animated:YES];
//返回上层
[self.navigationControllerpopViewControllerAnimated:YES];
第二种:presentModelViewController(ios5.0以下),presentViewController(ios5.0以上)
AddInfo*control = [[AddInfo alloc] init];
(ios5.0以下)
[selfpresentModalViewController:control animated:YES];
[selfdismissModalViewControllerAnimated:YES];
(ios5.0以上)
[self presentViewController:control animated:YES completion:nil];
[self dismissViewControllerAnimater:YES completion:nil];
第三种:视图添加和移除
//self.view.window.rootViewController= detailViewController;
[self.view.windowaddSubview:detailViewController.view]; []
[self.viewremoveFromSuperview];;

原文:http://www.cnblogs.com/kingbo/p/3658217.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!