我在iPad Storyboard中有一个Master和Detail View控制器。我还有一个AddUserController.xib视图。我需要从当前的Detail View Controller打开AddUserController.xib视图。按钮的代码,应该这样做,但它没有,是:
NSArray *viewControllers;
AddUserController *addUser = [[AddUserController alloc] initWithNibName:@"AddUserController" bundle:[NSBundle mainBundle]];
self.splitViewController.viewControllers = [NSArray arrayWithObjects:self.navigationController, addUser, nil];
self.splitViewController.viewControllers = viewControllers;
[self presentViewController:addUser animated:YES completion:NULL];