iOS UITableViewCell imageView border
iOS UITableViewCell imageView border
- Subject: iOS UITableViewCell imageView border
- From: Alex Zavatone <email@hidden>
- Date: Fri, 16 Aug 2013 13:13:49 +0000 (GMT)
I've looked around StackExchange and though there are many suggestions on how to add borders to UITableViewCells, which I've tested and which work, I'm at a loss on how to add a border to a UITableViewCell's imageView.
Within tableView:cellForRowAtIndexPath, I've got this code:
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
cell.imageView.image = [UIImage imageNamed:@"Placeholder.png"];
CALayer* layer;
//layer = cell.layer;
layer = cell.imageView.layer;
[layer setMasksToBounds:YES];
[layer setCornerRadius:10.0f];
[layer setBorderWidth:10.0f];
Note the commented out //layer = cell.layer; line. If this is uncommented and the line below it is commented, the cell gets a thick border around the cell itself as expected, but when trying the same on the cell.imageView.layer there is no change to the cell's imageView.
Is there something I'm missing here?
I'm on iOS 6.x, Xcode 4.6.3
Thanks
- Alex Zavatone
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden