2016-03-02 11 views
2

當我在UITableView中獲取單元格時遇到問題。它導致崩潰我的應用程序和顯示日誌:警告:無法加載任何Objective-C類信息。這將顯着降低可用類型信息的質量

警告:無法加載任何Objective-C類信息。這會使 顯着降低可用類型信息的質量。

而且這是我的代碼:

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 
    CustomCell *cell = [_theTableView cellForRowAtIndexPath:indexPath]; 
    CGSize labelSize = [cell.timeLabel.text sizeWithAttributes:@{NSFontAttributeName:cell.timeLabel.font}]; 
    CGFloat timeLabelHeight = labelSize.height; 

它送花兒給人破裂和崩潰在線

CustomCell *cell = [_theTableView cellForRowAtIndexPath:indexPath]; 

能不能幫我解決這個問題。謝謝。

回答

-1

您應鍵入的代碼更改:

CustomCell *cell = [_theTableView cellForRowAtIndexPath:indexPath]; 

爲以下幾點:

CustomCell *cell = [self tableView:tableView cellForRowAtIndexPath:indexPath] 
+0

我不理解爲什麼這個答案和ARC下它使什麼區別呢。 – Droppy