简体   繁体   中英

Why are my table view delegate methods not being called on -reloadData?

i have NSobject page inwhich i have method to reload table like

MainPageTable *m = [[ MainPageTable alloc] init];
[m.tableView reloadData];
[m release];

The following is called:

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

but this is not:

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

any help please?

mm. reloadData is a standart tableView's method. after this call your tablewView asks it's delegate and dataSource about info it's need to be reloaded as numbers of sections in the table after reload, new cells, etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM