user393273
user393273

Reputation: 1438

reload TableView with data

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

Answers (2)

Jilouc
Jilouc

Reputation: 12714

Looks like ThirdViewController is the name of a class, not an object. Try just

[tableView reloadData];

Upvotes: 2

Aditya
Aditya

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

Related Questions