沒有被調(diào)用的原因可能是數(shù)據(jù)源中沒有數(shù)據(jù)!
注意這幾個(gè)相關(guān)方法的調(diào)用順序是: 1、先調(diào)用numberOfSectionsInTableView
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView;當(dāng)有數(shù)據(jù)時(shí)才會往下進(jìn)行,才會調(diào)用方法:tableView:cellForRowAtIndexPath;
2、當(dāng)numberOfSectionsInTableView不為0時(shí)說明有數(shù)據(jù),這時(shí)才會獲取每個(gè)section中的numberOfRows
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section;新聞熱點(diǎn)
疑難解答