tags:

views:

42

answers:

2

HI all

i am using

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];

    [tableview reloadData];////not working
}

but my table is not reloading.but when i put [tableview reloadData]; in viewdidload, my data didnt show up.

BUt on rerunning the app, whole data shown up... i m confused ,what is happeneing here.plz suggest me a proper way to reload table.

+1  A: 

Try

[self.tableView reloadData];

check that you have set the delegates properly

In

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

return [datas count];
  }

Make sure that you update the mutable array "datas" with the values.Because only with reference to this array count table cells are created.

All the best.

Warrior
that count is returning value...table has values.but on he same instance it doesnt get loaded, but when i close my app and rerun again...data comes up. its kind of strange...no ida wat is goin wrong here
shishir.bobby
A: 

are you getting data from internet like xml parsing..?

Kuldeep Sidhu
no no, i am using sqlite to insert data from one view, and just displaying it in another view's table view.after inserting data when i move to this tablewvieww(wher i am reloading my table), nothing comes up, but when i rerun my apps, data is filled in table view.
shishir.bobby
i think its problm in method calling..
Kuldeep Sidhu