我有一些邏輯,需要不同的view
出現一旦button
被按下。此代碼的作品來自appDelegate
,但不在我的ViewController
實現中。有沒有辦法從當前的ViewController
執行改變視圖控制器故事板?我能否將rootViewController更改爲ViewController中的其他故事板視圖?
self.window.rootViewController =
(UIViewController *)[[UIStoryboard storyboardWithName:@"Main" bundle: nil] instantiateViewControllerWithIdentifier:@"homeView"];
這兩個答案都是有效的,但是這個人是更簡潔。 – 2015-04-04 19:59:25