Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:] 今天做一個tableView遇到一個這麼個問題。 經過baidu google,終於找到正解。 因為 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 這個函式的返回值是個null!! 查stackoverflow 找到下面的解。 CellIdentifier I bet your cellForRowAtIndexPath is returning null. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Photos"; /** NOTE: This method can return nil so you need to account for that in code */ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; // NOTE: Add some code like this to create a new cell if there are none to reuse if(cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } NSString *string = [[self.photosInPlace objectAtIndex:indexPath.row] valueForKeyPath:@"description._content"]; cell.textLabel.text = string; return cell; } That's probably why [UITableView _configureCellForDisplay:forIndexPath:] is failing... becausecellForRowAtIndexPath is returning a null value and then configureCellForDisplay is expecting aUITableViewCell.
轉:Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:]
轉載於:https://www.cnblogs.com/ygm900/archive/2013/06/13/3134425.html
相關文章
- Assertion failure in -[UITableView -configureCellForDisplay:forIndexPath:]AIUIViewIndex
- Assertion failure 錯誤AI
- Assertion failure in -[UICollectionViewData validateLayoutInRect:]AIUIView
- ORA-29516: Aurora assertion failure: Assertion failure at joez.c:3311AI
- [InnoDB] Assertion failure: ut0ut.cc:553 thread 140235111884544【筆記】AIthread筆記
- vulnhub - ASSERTION1.0.1
- dequeueReusableCellWithIdentifier vs dequeueReusableCellWithIdentifier : forIndexPathIDEIndex
- UITableViewUIView
- 練習使用list failure,advise failure; repair failure;AI
- Failure is not fatal, but failure to change might be.AI
- UITableView --SwiftUIViewSwift
- UITableView的坑UIView
- UITableView優化UIView優化
- design for failureAI
- UITableView/UICollectionView使用技巧UIView
- UITableView+FDTemplateLayoutCell 庫UIView
- UITableView使用詳解UIView
- UItableView效能優化UIView優化
- ASSERTION FAILED: TLS ALLOCATOR ALLOC_TEMP_THREAD...AITLSthread
- MongoDB報錯:"assertion" : "can't map file memory"MongoDB
- Ext success failure 呼叫AI
- 優雅的使用UITableViewUIView
- iOS UITableView 修改屬性iOSUIView
- Swift iOS: UITableView的使用SwiftiOSUIView
- UITableview 常見問題UIView
- UITableView 鍵盤遮擋UIView
- cannot convert (type interface {}) to type int: need type assertion
- 安裝CLUSTER碰到 Assertion failed offset fFileSize錯誤AI
- UITableview巢狀UITableView案例實踐(仿淘寶商品詳情頁實現)UIView巢狀
- DRIVER_POWER_STATE_FAILUREAI
- Vagrant:NS_ERROR_FAILUREErrorAI
- Python中不盡如人意的斷言AssertionPython
- iOS UITableView側滑刪除iOSUIView
- 10.12UITableView(cell)UIView
- UITableView 常用屬性及方法UIView
- LPDMvvmKit 系列之 UITableView 的改造MVVMUIView
- UITableView+FDTemplateLayoutCell 原始碼探究UIView原始碼
- UITableView複雜介面處理UIView