iOS5中用storyboard,在AppDelegate中获得ViewController对象的方法记录:
1 UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle: nil]; 2 self.viewController = (ViewController* )[mainStoryboard instantiateViewControllerWithIdentifier: @"LoginViewController"];
然后在viewController中设置identifier就可以了。