我在故事板中有一個鏈,我想在第一次啓動應用程序時啓動(例如)第二個視圖。我有一些代碼,只在從故事板鏈顯示視圖
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
方法工作,如果我把它放在
- (void)viewDidLoad
方法它不工作,
這表明我的另一個觀點是代碼:
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
UIViewController *vc = [mainStoryboard instantiateViewControllerWithIdentifier:@"someId"];
[vc setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal];
如何顯示視圖,這些視圖在應用程序第一次啓動時在故事板中有鏈接位置?
我怎樣才能做到這一點? – Aleksey
我使用viewController和按鈕(UIBarButtonItem),當我按下導航控制器顯示。 – Aleksey