开发者

How can I present a modal view controller after selecting a contact?

I'm trying to present a modal view controller after selecting a contact and it doesnt seem to be working.

In my -

(BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person

method, I dismiss peoplePicker, create an instance of my new view controller, then present it with

[self.navigationController presentModalViewController:newController animated:YES];

and it doesnt work. However if i PUSH the view controller it works wi开发者_如何学Pythonth this code:

[self.navigationController pushViewController:newController animated:YES];

How can I accomplish this?

Thank you,


Simply call the presentModalViewController on your own controller instead of the navigation controller. If you're in the context of a UIViewController: [self presentModalViewController:newController animated:YES];

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜