我打電話UITableView
代表的heightForRowAtIndexPath
內的numberOfRowsInSection
方法,但它給了我一個壞訪問錯誤:的iOS的UITableView numberOfRowsInSection錯誤訪問
- (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
...
NSLog(@"number of rows in section: %i", [tableView numberOfRowsInSection:[indexPath section]]);
...
}
任何人能告訴我什麼是錯在這裏?
你應該向我們展示你'做什麼......因爲這可能是相關的。例如,你實際上是否返回一個值。不這樣做可能會導致BAD ACCESS。 – Besi
你檢查這個問題http://stackoverflow.com/questions/31667986/ios-uitableview-numberofrowsinsection-in-tableview-heightforrowatindexpath-give –