IOS基礎:窗口切換的幾種方法


1 controller切換
AboutViewController *aboutViewController = [[AboutViewController alloc]init];

[self.navigationController pushViewController:aboutViewController animated:YES]; //新視圖壓入到棧中

[AboutViewController release];


AboutViewController 返回按鈕:
[self.navigationController popViewControllerAnimated:YES];//彈出后返回到原視圖

2 從上向上滑出
NewProfileViewController *newProfileController =[[ewProfileViewController alloc]init];

[self.navigationController presentModalViewController:newProfileController animated:YES];

[newProfileController release];

 

NewProfileViewController取消按鈕:
[self dismissModalViewControllerAnimated:YES];

 

3 彈出窗口

4 窗口翻轉


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM