Am使用此故事板概念開發iphone應用程序。iPhone故事板呈現模型視圖以編程方式
這裏我已經完成了使用這個故事板的初始視圖。
在這裏,我已經在用戶點擊這個按鈕編程方式在rootviewcontroller中創建了一個按鈕,我應該提出另一個視圖控制器讓我們說root2ViewController。我在下面的代碼中使用了當前的視圖,但它沒有顯示任何內容,並且它說像標識符未找到。任何解決方案和想法將不勝感激。
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:[NSBundle mainBundle]]; UIViewController *root2ViewController = [storyboard instantiateViewControllerWithIdentifier:@"MyIdentifier"]; [root2ViewController setModalPresentationStyle:UIModalPresentationFullScreen]; [self presentViewController:root2ViewController animated:animation completion:nil];
是的,我已經加入 – nik