Created
October 23, 2012 09:35
-
-
Save chiahsien/3937898 to your computer and use it in GitHub Desktop.
手動載入 Storyboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (IBAction)click:(id)sender | |
{ | |
// 1. 載入特定的 Storyboard | |
UIStoryboard *board = [UIStoryboard storyboardWithName:@"SecondStoryboard" bundle:nil]; | |
// 2. 初始化這個 storyboard 裡的某一個 view controller | |
MyCustomViewController *vc = [board instantiateViewControllerWithIdentifier:@"My Custom View Controller"]; | |
// 3. 顯示這個 view controller | |
[self presentModalViewController:vc animated:NO]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment