actually i have found some thread that asking question like mine. but every solution that given in those thread can not be use in my code.. the last link i was read is How to customize the background color of a UITableViewCell?
my problem is i just want to change my tableviewcell background color with my own color. can somebody help me??
How about something like:
[myCell setBackgroundColor:[UIColor colorWithRed:0.2 blue:0.5 green:0.2 alpha:1]];
One place you could put this would be your table view's willDisplayCell:forRowAtIndexPath: data source method. Or else you could subclass UITableViewCell and set it in your overridden initializer. Or you could load the cell from a XIB and use Interface Builder to set the color.
try this..
cell.backGroundColor = [UIColor colorWithRed:190.0/255.0 blue:190.0/255.0 green:190.0/255.0 alpha:1.0];
Write this code in cellForRowAtIndexPath function.
U will get these kind of different RGB combinations simply from MS Paint and alpha is the opacity ranging in between 0.0 to 1.0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With