2
是否可以創建2個故事板並根據設備方向訪問它們中的每一個?我試過這段代碼:縱向和橫向的2個不同的故事板
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
if (UIInterfaceOrientationPortrait){
UIStoryboard *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"Storyboardland.storyboard"];
}else if (UIInterfaceOrientationPortraitUpsideDown){
UIStoryboard *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"MainStoryboard_iPad.storyboard"];
}}
...但不起作用??我正在犯的任何錯誤?