1

Thanks for a great resource!

I am currently working on a project that involves Tab Bars. Basically I have one .xib file that contains 5 Navigation Controllers, within those each has a view controller then a tableView.

My question is, how do I get a button on the navigation controller within a view controller to update the table view on the first navigation controller?

Also within the Navigation item title bar I cannot get any buttons to work.

Sorry if this is a newby post, but it is doing my head in.
Any comments would be appreciated.

1 Answers1

2

You're thinking about this incorrectly. The correct thing to update is your model, not your view (i.e. tableView). You should have a separate set of model classes that hold your data. Each view controller will then access those classes to read or update the data. The view controllers don't talk to each other generally.

This approach to programming is called Model-View-Controller, and it's the core of the iOS architecture.

Rob Napier
  • 286,113
  • 34
  • 456
  • 610