3

    ABPeoplePickerNavigationController _contactController;

    public override bool FinishedLaunching (UIApplication app, NSDictionary options)
    {
        window = new UIWindow (UIScreen.MainScreen.Bounds);

        _contactController = new ABPeoplePickerNavigationController();

        //viewController = new HomeScreen ();
        //navController = new UINavigationController (_contactController);
        window.RootViewController = _contactController;
        window.MakeKeyAndVisible ();

        return true;
    }

so now when the app opens the contact list is displayed. I want to put a different functionality to the rightnavigationbar Button instead of the cancel? How do i do this? how to get access to this button?

Maxim Korobov
  • 2,574
  • 1
  • 26
  • 44
varun
  • 65
  • 5

1 Answers1

0

ABPeoplePickerNavigationController control couldn't be modified without finding right subviews in it's view. Moreover, app with such modifications could be denied by Apple.

Try to make your own UIViewController, which functionality will be close to iOSs ABPeoplePickerNavigationController:

  • Read contacts via AddressBook class;
  • Pass contact data into UITableView with sections and indexes.
Community
  • 1
  • 1
Maxim Korobov
  • 2,574
  • 1
  • 26
  • 44
  • But then the UI is affected.This also becomes a lengthy process.Any other solution for this? – varun Apr 17 '13 at 05:21
  • This is true. Making your own dialog is a bit harder and longer process. Yet it will be 100% flexible in future and will be App Store compatible. – Maxim Korobov Apr 17 '13 at 08:18
  • There should be another way to change the navigationitem control or access the navigation item so that on that click i can add another view and this is done in objective-c.The contacts app has this functionality which directs it to a new view which is for "add new contact". – varun Apr 17 '13 at 08:40
  • Seems like it's not possible. I'd tried to subclass `ABPeoplePickerNavigationController` and change properties of it's `NavigationItem` and `NavigationController.NavigationItem` - unfortunately, nothing had changed. – Maxim Korobov Apr 17 '13 at 09:02
  • References: http://stackoverflow.com/questions/4688072/how-can-i-change-the-look-of-abpeoplepickernavigationcontroller-so-that-i-can-se, http://stackoverflow.com/questions/11362936/customized-abpeoplepickernavigationcontroller-like-viber-whatsapp I'm sorry. – Maxim Korobov Apr 17 '13 at 09:20