在iPad上未检测到UITableViewCell Opacity

时间:2014-01-09 15:26:57

标签: ios iphone ipad uitableview

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{    
    if ([indexPath row] %2 == 0)
    {
        cell.contentView.backgroundColor = kColorTablePrimary;
    }
    else
    {
        cell.contentView.backgroundColor = kColorTableSecondary;
    }
}

这是我目前正在使用的代码,不透明度仅在iPhone上检测到,但我在此代码中有一个断点,当我使用iPad时,它肯定会被调用,只是不显示不透明度。我已经完成了设置,单元格设置相同,与UITableViews相同。

以下是外观差异的截图:

iPhone iPad

0 个答案:

没有答案