0

This question is already asked but was still not answered. (here)

I have made a UIViewController that looks like ABPersonViewController view with some added buttons.

I also have the edit button at the right navigation bar that already have a function of calling the ABPersonViewController, I know it is possible to programmatically load the edit view of it but i just can't find the right code. (Viber does this)

Any help would be appreciated. Thanks :)

Community
  • 1
  • 1
Bryan
  • 3
  • 4
  • Did you check out the Apple sample code ? (https://developer.apple.com/library/ios/#samplecode/QuickContacts/Listings/Classes_QuickContactsViewController_m.html#//apple_ref/doc/uid/DTS40009475-Classes_QuickContactsViewController_m-DontLinkElementID_6) – Daniel Aug 06 '12 at 04:23
  • Yep...It does have a sample of calling the `ABPersonViewController` with the edit button, but what i want to do is automatically click the edit button on its `viewWillAppear`. – Bryan Aug 06 '12 at 05:50

1 Answers1

1

If the Edit button is just the standard

self.editButtonItem

Then that means that you probably have a UITableView and inside of the viewWillAppear method you can just call

[self setEditing:YES];

However, if the code has an Edit method, then just call that method from viewWillAppear.

Flipper
  • 2,589
  • 3
  • 24
  • 32
  • 1
    Thank you so much!! I'am searching for this about 2 days now. I would like to give you a vote up but i don't have the required reputation yet. – Bryan Aug 06 '12 at 06:32
  • @Bryan That's fine, you can always come back when you have enough. Glad to be of help! – Flipper Aug 06 '12 at 06:33