iPhone AppStore的UITableViewCell背景色

| 我想在我的iPhone App中测试一些不同的彩色单元格,我认为与应用商店相同的彩色单元格可能会适合。因此,我想尝试一下。不幸的是,我没有电池的颜色代码,有人知道吗? 这些是起作用的颜色: 另外,此代码是否可以正确显示它们?
- (void)tableView: (UITableView *)tableView willDisplayCell: (UITableViewCell *)cell forRowAtIndexPath: (NSIndexPath *)indexPath {

if ( indexPath.row%2 == 0) { 
UIColor *altCellColor = [UIColor colorWithRed:256/256.0 green:237/256.0 blue:227/256.0 alpha:1.0]; /
cell.backgroundColor = altCellColor;
}
if ( indexPath.row%2 == 1) {
UIColor *altCellColor2 = [UIColor colorWithRed:1 green:1 blue:1alpha:1.0];
cell.backgroundColor = altCellColor2;
}
    
已邀请:
您发布的代码看起来可以使用。您要寻找的两种颜色是
[UIColor colorWithRed:.678 green:.678 blue:.69 alpha:1]
[UIColor colorWithRed:.596 green:.596 blue:.612 alpha:1]
    
如果您使用的是Mac,则只需在Spotlight中搜索
Digital Color Meter
(Application实用程序中的该应用程序)。此应用程序将为您提供所需的任何RGB和其他颜色代码值。 谢谢     
您可以使用此代码。对我有用
[UIColor colorWithRed:172.0/255.0 green:217.0/255.0 blue:246.0/255.0 alpha:1]
    

要回复问题请先登录注册