Skip to content

Instantly share code, notes, and snippets.

@chiahsien
Created October 23, 2012 09:35
Show Gist options
  • Save chiahsien/3937898 to your computer and use it in GitHub Desktop.
Save chiahsien/3937898 to your computer and use it in GitHub Desktop.
手動載入 Storyboard
- (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