0

My problem here is not knowing how to utilize the edit button in a UIToolbar correctly.

Basically, I have 3 VC the first 2 are inherited from the Navigation VC and then I added a third.

The first VC displays an empty TableView until you add cells to it through the UIToolbar. You then click on a cell it pushes to the second VC which displays information about that cell (think of it as a list of friends and the second VC displays the friends name and email). Now here comes my problem, I'm not sure how to properly use the edit button on the UIToolbar to edit the information on the second VC.

So I want to switch from the second VC to temporarily display another VC like you would in the iOS contacts app and then go back with the VC updated and displaying the info that was just entered on the Edit VC.

Im not asking for solution code just for guidance, I'm currently a student on break and trying to make something to keep me busy and occupied.

Thanks in advance to anyone who replies.

67cherries
  • 6,931
  • 7
  • 35
  • 51
Vince
  • 691
  • 1
  • 8
  • 18

1 Answers1

0

You should use delegate to update your VC. In your Edit VC, create a delegate with a function like "didFinishEditing". When you complete your editing, call that function. The implementation of that function must be write in your VC.

This topic may useful for you: How do I create delegates in Objective-C?

Community
  • 1
  • 1
  • first, how do i go about creating the segue from the edit toolbar button to go to the edit VC ? i have trie the Prepareforsegue method but it doesn't seem to work for me. currently the on click of the edit button in the toolbar brings me to a black screen – Vince Feb 12 '14 at 05:28