开发者

problem in reloading tableview

开发者 https://www.devze.com 2023-01-19 22:18 出处:网络
HI all i am using - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; [table开发者_运维知识库view reloadData];////not working

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

精彩评论

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

关注公众号