zhxnlai / ZLPeoplePickerViewController

A multilingual replacement for ABPeoplePickerNavigationController (address book picker) that supports UILocalized​Indexed​Collation
MIT License
189 stars 48 forks source link

How can i set ZLPeoplePickerViewController as Initial ViewController for navigation controller? #15

Closed ismaiI1 closed 8 years ago

ismaiI1 commented 9 years ago

i have 5 tabs and navigation bar. i want to add this project to my third tab.

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

when i add like that, back button shown on navigation bar.

i mean, i want to like that whatsapp

how can i do that? and sorry for my english.

lteti77 commented 8 years ago

i think you should simply declare a navigation controller, initialize the root viewcontroller with ZLPeoplePickerViewController and set the third tab with the navigation controller.

UITabBarController *tbc = [[UITabBarController alloc] init];
UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:self.peoplePicker];
NSArray *controllers = [NSArray arrayWithObjects: /*first, second*/ nc /*fourth, fifth*/,nil];
tbc.viewControllers = controllers;
ismaiI1 commented 8 years ago

too late :) .. i made my own people picker. thanks 👍