I’m using a UISplitviewController as a template.
action for edit button:
newExViewController *editWindow =[[newExViewController alloc]initWithNibName:@"newExViewController" bundle:nil];
UINavigationController *navBar=[[UINavigationController alloc]initWithRootViewController:editWindow];
navBar.modalPresentationStyle = UIModalPresentationFormSheet;
navBar.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:navBar animated:YES];
[navBar release];
[editWindow release];
navBar has a UIBarButton for saveButton. This is called when you press SaveButton
[self dismissModalViewControllerAnimated:YES];
now is the problem:
any idea how to reload the data for both the main NavigationConteroller and the detailViewController when the modalView is dismissed??
I have no clue
thnx
You should look into
NSNotificationCenter. In your view with the UITableView, create the notification listener. Then in the view that dismisses, call that notification.To be more specific, the Notification will call a method that should contain
reloadData.Example
The following should go with the UITableView you want to reload:
This could go along with your
[self dismissModalViewControllerAnimated:YES];This is how you will call the notification center to reload the table:
Example of the notification method:
And don’t forget to remove the notificaiton observer: