I need to add a bevel to my UITableViewCell (white line at the top, dark line at the bottom). I already have a CAGradientLayer that is added as a subheading of my cell.layer. Unfortunately, I cannot use UIImageView as a background for my cells, so this needs to be done in code. Any suggestions? Thanks!
This is the code that I have for the background of my cell.
CAGradientLayer *gradientLayer = [CAGradientLayer layer]; gradientLayer.frame = cell.frame; gradientLayer.colors = [NSArray arrayWithObjects: (id)[[UIColor colorWithRed:0.988 green:0.988 blue:0.988 alpha:1.0] CGColor], (id)[[UIColor colorWithRed:0.9294 green:0.9294 blue:0.949 alpha:1.0] CGColor], nil]; [cell.layer insertSublayer:gradientLayer atIndex:0];
This looks great, but I would like to have 1 pixel dark line at the bottom and 1 pixel white line at the top to complete the look.
objective-c iphone cocoa-touch uitableview
NSAlexC
source share