拿來一段別人的代碼,結果tableView總是不執行cellForRowAtIndexPath這個方法
跟蹤發現原因如下:tableView的另一個方法結果返回不正確:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section;
修正該方法的返回值,即可。
