I have my MainViewController which a UIViewController class, in this view I have a table view and another view embedded in it. As you can see I added the table view delegates to the view controller.
@interface MainViewController : UIViewController <FlipsideViewControllerDelegate, UITableViewDataSource, UITableViewDelegate> {
Now to my question which has been asked about 50 times from multiple searches on the internet but still I have not been able to find a solution.
Why doesn’t reloadData work…?
I am downloading info from an XML feed and I refresh the feed from the app delegate:
- (void)applicationDidBecomeActive:(UIApplication *)application
I have inserted multiple NSLogs, this is what I have found. The refreshed data from the XML feed is coming in no problem. But the table view cells are not being refreshed.
I placed a NSLog in:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
Although the data is being refreshed, when I call [tableView reloadData]; the cellForRowAtIndexPath is never called.
I am hoping someone can help me with this issue, I have been working on this issue for about 12 hours with no luck. I have exhausted the search button on multiple sites….
FYI:
-Table View is wired in Interface Builder.
-My tables are being loaded one by one via TableViewCells, following Apples example starting on page 51 of the Table View Programming guide.
Additional Code:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
// Return the number of sections.
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
// Return the number of rows in the section.
return 17;
}
Thanks for the help
Everything is working now… That was a lot of time wasted on my part…