So I'm trying to switch from one UIViewController to another using the navigation controller. I know for sure that the new controller goes successfully through the custom init method and creates two UIBarButtons. However, the content of the screen (4 labels, 3 textfields, 1 UIImageView) doesn't show up. Instead, I just see a grey screen.
Passing the NSLog message through the ViewDidLoad,ViewWillLoad and ViewWillAppear showed that all these were successfully executed.
Here is the gitHub repo if you want to take a look: http://ift.tt/1cjGCZv
Here is the code that I use to pass a new controller:
// Create a new student and add it to the store
Student* newStudent = [[StudentStore sharedStore] createStudent];
StudentDetailViewController *detailViewController = [[StudentDetailViewController alloc] initForNewStudent:YES];
detailViewController.student = newStudent;
detailViewController.dismissBlock = ^{
[self.tableView reloadData];
};
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:detailViewController];
navController.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentViewController:navController animated:YES completion:NULL];
Aucun commentaire:
Enregistrer un commentaire