cellForRowAtIndexPath メソッドが呼び出されないのはなぜですか?

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

呼び出されない理由は、データ ソースにデータがない可能性があります。

これらの関連メソッドの呼び出し順序は次のとおりであることに注意してください。
1. 最初にnumberOfSectionsInTableViewを呼び出します。

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView;

データがある場合はダウンし、次のメソッドが呼び出されます。

2.numberOfSectionsInTableViewが0以外の場合はデータがあることを意味し、各セクションのnumberOfRowsを取得します。

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

おすすめ

転載: blog.csdn.net/fanyong245758753/article/details/58139041