max_
max_

Reputation: 24501

iPhone AppStore's UITableViewCell background colours

I wanted to test out some different coloured cells in my iPhone App, and I thought that the same coloured cells as the app store ones would probably suit. Therefore I wanted to try them out. Unfortunately I do not have the colour codes for the cells, does anyone know?

These are the colours in action:

http://reviews.cnet.com/i/bto/20080710/AppStore3.png

Also, would this code be correct to show them?

- (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;
}

Upvotes: 0

Views: 853

Answers (3)

Erhan Demirci
Erhan Demirci

Reputation: 4209

you can use this code. it's worked for me

[UIColor colorWithRed:172.0/255.0 green:217.0/255.0 blue:246.0/255.0 alpha:1]

Upvotes: 0

Noah Witherspoon
Noah Witherspoon

Reputation: 57149

The code you posted looks like it'll work. The two colors you're looking for are

[UIColor colorWithRed:.678 green:.678 blue:.69 alpha:1]

and

[UIColor colorWithRed:.596 green:.596 blue:.612 alpha:1]

Upvotes: 1

Ravin
Ravin

Reputation: 8564

If you are working on mac then, just search fo Digital Color Meter in spotlight(this app in Application's utility). This application will give you any RGB and other color code value that you want.

Thanks

Upvotes: 1

Related Questions