使用StoryBoard呈现视图控制器的新方法。使用StoryBoard呈现ViewController的iOS Xcode 4.2
UIStoryboard* secondStoryboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
UINavigationController* secondViewController = [secondStoryboard instantiateViewControllerWithIdentifier:@"Connect"];
[self presentViewController: secondViewController animated:YES completion: NULL];
呈现控制器连接的老办法是这样的
Connect *connect = [[[Connect alloc] initWithNibName:@"Connect" bundle:nil] autorelease];
[self presentViewController:connect animated:YES completion:NULL];
NSString *userid;
[email protected]"123";
[connect setID:userid];
我想打电话给在故事板的方式连接控制器的SETID功能,我该怎么办呢?好像我没有直接获得Connect控制器的实例。
因为如果我这样做,那么连接viewcontroller将有一个我想要的后退按钮。 –