开发者

problem in reloading tableview

HI all

i am using

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

    [table开发者_运维知识库view 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜