Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

anim510

macrumors newbie
Original poster
Oct 20, 2008
15
0
hi all,

I want to change the tableView's cell's style, just like the App Store's style.

I use this code,

Code:
    if((indexPath.row+1)%2 == 0)
       cell.backgroundColor = [UIColor grayColor];

But it doesn't work.

kind regards,
Neil.
 
Try adding a UIImageView behind the table, and setting its image to the background you want.

Then set the table's background colour to transparent with:

Code:
tableView.backgroundColor = [UIColor clearColor];

So that the background image shows through.
 
Thanks guys

Try adding a UIImageView behind the table, and setting its image to the background you want.

Then set the table's background colour to transparent with:

Code:
tableView.backgroundColor = [UIColor clearColor];

So that the background image shows through.


Thanks for your suggestion ! :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.