Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nicoko

macrumors newbie
Original poster
Jan 6, 2009
4
0
Hi,

In one of my views I would like to have a segmented control in the navigation bar.

Clicking on one of the buttons should reload the table with a different parameter.

What I have so far:
- navigation bar with the two segmented control buttons;
- table with a few cells (data comes from a json file).

How can I reload the view in order to fill the table with a different json file as source?

Thanks,

Nico
 
Having same problem

Hi I have called [AMCustomerTableView reloadData] where AMCustomerTableView is the table view object, but doing an NSLog in the

Code:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

function shows that this is not being called when the reloadData is being called.

I have setup a function called changeSegment and put this in the navigation bar control. Set it as an IBAction and linked this in interface builder.

I have created a function in the table view control .m file which get the data from a server and returns json this NSMutibleArray is then used to add the data to the table.

The problem is this is not reloading the data when i click on any of the segment buttons.

Has anyone else had this problem.
 
Last edited by a moderator:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.