Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
hide "Cancel" button ABPeoplePickerNavigationController and add another button performs like Cancel button.
//picker is ABPeoplePickerNavigationController
[self presentModalViewController:picker animated:YES];
UIButton* backButton= [[UIButton alloc]initWithFrame:CGRectMake(9, 25, 35, 35)];
[backButton setImage:[UIImage imageNamed:@"btnBack.png"] forState:UIControlStateNormal];
[backButton addTarget:picker.topViewController.navigationItem.rightBarButtonItem.target action:picker.topViewController.navigationItem.rightBarButtonItem.action forControlEvents:UIControlEventTouchUpInside];
[picker.navigationBar.superview addSubview:backButton];
//or you can use leftBarButtonItem instead of UIButton
//picker.topViewController.navigationItem.leftBarButtonItem= [[UIBarButtonItem alloc]initWithCustomView:backButton];
picker.topViewController.navigationItem.rightBarButtonItem=nil;
//hide search bar in UITableView in ABPeoplePickerNavigationController
//NSLog(@"%d",picker.topViewController.view.subviews.count);
//NSLog(@"%@", [[picker.topViewController.view.subviews objectAtIndex:0] class]);
//UITableView* tableView=[picker.topViewController.view.subviews objectAtIndex:0];
//tableView.tableHeaderView=nil;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.