Last active
August 29, 2015 14:16
-
-
Save goldcoast/978ac14b2704d23cd24f to your computer and use it in GitHub Desktop.
viewController的两种初始化方法
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
// 1. init with storyboard | |
//@"xxViewController" 这个值需要在storyboard中indetity inspector的storyboard ID相同 | |
//这种初始化可以带入storyboard的segue | |
xxViewController *xxViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"xxViewController"]; | |
// 2. init directly | |
aaViewController *aaViewController = [[aaViewController alloc] init]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment