• 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
Re: Framing a UIImageView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Framing a UIImageView


  • Subject: Re: Framing a UIImageView
  • From: Joshua Pennington <email@hidden>
  • Date: Wed, 9 Sep 2009 21:13:28 -0500

UIImageView uses its underlying layer property to draw the image, so - drawRect: is not being invoked.

If you are simply wanting to display a border around the image, see CALayer's borderColor & borderWidth properties.

i.e.

imageView.layer.borderWidth = 1.0;
imageView.layer.borderColor = [[UIColor redColor] CGColor];

Cheers,
Joshua

On Sep 9, 2009, at 8:54 PM, Development <email@hidden> wrote:

I'm trying to stroke a rect around a UIImage. I have subclassed UIImageView with the following code but I get Nothing the drawRect: method is never called:

_______________________________________________

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: Framing a UIImageView
      • From: Development <email@hidden>
  • Prev by Date: Re: Scripting Bridge link error
  • Next by Date: Re: Framing a UIImageView
  • Previous by thread: Framing a UIImageView
  • Next by thread: Re: Framing a UIImageView
  • Index(es):
    • Date
    • Thread