界面跳转

来源:互联网 发布:ocr识别软件绿色版 编辑:程序博客网 时间:2024/04/26 08:51

除了navigationcontroller 和 presentMadolViewcontroller 界面跳转的一些方式:


第1种方法

thirdController * myThirdCtl = [[thirdController alloc]init];
[self.view addSubview:myThirdCtl.view];
[self addChildViewController:myThirdCtl];
[myThirdCtl.view setFrame:CGRectMake(0, 0, 320, 460)];


[self.view removeFromSuperview];
[self removeFromParentViewController];


第2种方法


fourthController * myFourthCtl = [[fourthController alloc]init];
AppDelegate * myApp = [[UIApplication sharedApplication] delegate];
myApp.window.rootViewController = myFourthCtl;
[myFourthCtl release];


thirdController * myThirdCtl = [[thirdController alloc]init];
AppDelegate * myApp = [[UIApplication sharedApplication]delegate];
myApp.window.rootViewController = myThirdCtl;

[myThirdCtl release];


原创粉丝点击