I'm implementing a notes manager application which has a tableView in a tabBar where the main information of its notes is displayed. When accessing to one note, you can edit its properties. In one button of the tabBar you can choose the way the notes are displayed in the tableView.
The problem I have is that I don't know how to reload the data from a child controller or from the other controller of the tabBar, either. I don't know how to refer to tableView from them so I can use reloadData to update the information of the TableView from them.
I'm quite new in iPhone development... any help will be really appreciated.
the MVC pattern will help here,
as long as you keep updating your model with the information that is needed and your controllers are updating from that modal. As you flick back between the views you end up automatically updating the views.
that way you can call your reload data methods and they will get updated.
is how you access the reload data message.
I came to the same problem while dealing with prototype cell. Weird I was quite sure I did everything right.
Then I started thinking if there's anything wrong with XCode. So I cleaned up everything, restarted XCode and it still complained.
At last, I tried to redo my most recent changes to the story board which is add a tableviewcell class and hooked it up with all my ui controls. Finally it stopped complaining.
I don't think this error is caused by your code or something, I've came to several weird errors in iOS 5. Right it's still testing and has lots of bugs.
Anyway, storyboard is great and I will try to get used to it, it draws the big picture of your app and is easy to handle the relationship between different views. Plus I really like his prepareforsegue method.
OK Good Luck.
Put your table updating code in viewWillAppear: in stead of viewDidLoad - that way each time you go back to your parent controller from the child controller, the data get reloaded.
You should try
NSNotificationCenter
.