Adding rows to UItableview and passing data between Viewcontrollers
- by Jonathan
I have a list of websites in a plist, when the app loads this populates a tableview (which is inside a navigation controller)
But I have added an add button to the navigation bar and then created another View Controller to deal with inputting of the new website (Like Title and URL). It is very similar to how the contacts app looks. There is a table view and when you tap add, the add UI slides up. I have got all this working great so far.
My Problem is what happens when the user taps Done.
I can add the website to the plist (each website is a dictionary in the plist with 2 keys, atm)
But then how do I tell the tableView to update? The table view has not been removed from the main window, just the add view has been added on top of the "screen".
Another way of asking is, when you tap Save on Add a Contact screen: (not my image)
How does the new contact's data (Xyz's data) get shown on the tableview?