2016-12-01 46 views
0

我正在使用具有UITableView和一些單元格的TodayExtension的應用程序。該擴展在舊設備上正常工作,但它不適用於較新的設備/模擬器。我認爲它可能與64位而不是32位有關。TodayExtension UITableViewCell不出現在64位設備

我遇到的確切問題:即使調用了所有的委託方法,UITableViewCells也沒有出現。我打印出來,他們的行爲完全符合預期。 UITableView出現在Extension上,而不是單元格。

代碼:

-(LifestyleWidgetTableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 
    LifestyleWidgetTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"lifestyleTableViewCell"]; 

    [cell.widgetCollectionView reloadData]; 
    [cell setUserInteractionEnabled:YES]; 
    [cell setSelectionStyle:UITableViewCellSelectionStyleDefault]; 

    return cell; 
} 

-(float)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 
    return 125; 
} 

-(int)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 
    return [[WidgetManager getInstance] getAllWidgetsOfType:LifestyleWidget].count + 1; 
} 

即使大小,因爲它應該增加更多的細胞等。只是沒有的內容出現時,調整...這有我徹底難倒了,如果有人能幫助我在這裏會非常感激。

(是的,我在中都包含的應用程序和擴展我的生成架構arm64)

回答

0

好吧,我想通了,在64位器件它是返回一個浮子的高度的問題TableViewCell代替CGFloat。 UITableViewCells結束了0的高度,這看起來好像不起作用。我總是無視警告,我的錯誤。