• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
iOS UITableViewCell imageView border
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: iOS UITableViewCell imageView border
      • From: Alex Zavatone <email@hidden>
  • Prev by Date: Re: predefined macro iOS vs OS X
  • Next by Date: Re: predefined macro iOS vs OS X
  • Previous by thread: Re: predefined macro iOS vs OS X
  • Next by thread: Re: iOS UITableViewCell imageView border
  • Index(es):
    • Date
    • Thread