iOS 9 ABPeoplePickerNavigationController doesnot show cancel and groups buttons on navigation bar

618 Views Asked by At

Below is the code how I am presenting my ABPickerNavigationController:

AppDelegate *delegate = [[UIApplication sharedApplication] delegate];
CGRect rect = delegate.window.frame;
address = [[ABPeoplePickerNavigationController alloc] init];
address.addressBook = ABAddressBookCreateWithOptions(nil, nil);
[address setPeoplePickerDelegate:self];
//[self presentViewController:address animated:YES completion:nil];

appWindow = [[UIWindow alloc] initWithFrame:rect];
appWindow.rootViewController=address;
[appWindow makeKeyAndVisible];

It does not show cancel and Groups button on the top navigation bar in iOS 9. If I uncomment the commented line above it works fine. As my application has many navigations I have written this generic code to present such viewcontrollers from anywhere (even from views). Whats wrong with this ?

0

There are 0 best solutions below