Weird Behavior on dismissing Modal View Controller
First post, have been lurking for a while reading. I have an app that needs to access the contacts on the device and this works ok, however when I dismiss the control, it goes away but I also lose other elements on my app.
I have a View Controller that contains 1 main view, this has a navigation bar as a header and a tab bar as a footer. I have an overlay view that contains the button to trigger the address book component. When the dismiss happens, the tab bar and nav bar disappear with the component!
This is the code I am using to show the address book:
Code: ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init]; picker.peoplePickerDelegate = self; [self pres开发者_C百科entModalViewController:picker animated:YES]; and dismissed with this:
Code: [self dismissModalViewControllerAnimated:YES]; pretty simple stuff. What could cause the dismiss command to do more than just remove the modal controller?
Thanks
Try presenting modal controller from tabBarController like [self.tabBarController presentModal...];
精彩评论