[英]Xcode : how to change storyboard load animation left to right
我如何在不進行segue的情況下從左到右更改情節提要動畫?
這是我加載情節提要的代碼:
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"LoadApplicationStoryboard" bundle:nil];
UIViewController *vc = [mainStoryboard instantiateViewControllerWithIdentifier:@"ApplicationController"];
[self presentViewController:vc animated:YES completion:nil];
代替當前,只是推動您的viewcontroller
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"LoadApplicationStoryboard" bundle:nil];
UIViewController *vc = [mainStoryboard instantiateViewControllerWithIdentifier:@"ApplicationController"];
[[self navigationController] pushViewController:vc animated:YES];
試試這個.. 在這里 ,在壽后,你可以做自定義動畫Segue前左到右使用CATransition
如果您要開發iOS 7+應用程序,則需要自定義轉換。 從一個視圖控制器轉到另一個視圖控制器時,您可以提供任何想要的動畫。
是的,它不是一個行代碼,需要一些時間來學習,但這是值得的。 您只需要實現兩個委托方法(Ope代表Present,一個代表Dismiss)和動畫代碼即可完成。
您可以從這里了解到:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.