Reputation: 1438
Basically i have a view with just a table view on it and on another tab you can add to this table view. but when you click the tab with the table view in it isnt updating it self, so how would i reload the data in the table view i have tried :
- (void) viewWillAppear: (BOOL) animated
{
[ThirdViewController.tableView reloadData];
}
with no success as i get error Expected ':' before '.' token
.
all of the cells are added via
- (UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
Any help would be great
Upvotes: 0
Views: 600
Reputation: 12714
Looks like ThirdViewController
is the name of a class, not an object.
Try just
[tableView reloadData];
Upvotes: 2
Reputation: 4396
You can modify your app in the following way
1 Take a segmentation control above the table view.
2 When the user taps on any of the segment,take separate View Controller which is pushed onto the stack.
Cheers
Upvotes: 0