This is strange behavior noticed while accessing contact details from address book in ios 8. My scenario is simple
- Show contacts table
- select a row that will invoke didSelectPerson method
- in didSelectPerson method
push SecondViewController
- (void)peoplePickerNavigationController:(ABPeoplePickerNavigationController*)peoplePicker didSelectPerson:(ABRecordRef)person; { SecondViewController *detailVC = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil]; [detailVC.view setBackgroundColor: [UIColor redColor]]; // [peoplePicker.navigationController pushViewController:detailVC animated:YES]; [peoplePicker pushViewController:detailVC animated:YES]; }
but what happens is ABPeoplePickerNavigationController dismiss. Please enlighten me on this.
I don't know the philosophy thing what happens under the hood of the "didSelectPerson" method, me was facing the same problem today. I found a simple solution to overcome this issue, i override the "-(void)dismissViewControllerAnimated:(BOOL)flag completion:(void (^)(void))completion" method of the "ABPeoplePickerNavigationController". Then implement it like somewhat following
then inside the "didSelectPerson" i have done the following
this works for me, hope you guys overcome it too :)