• 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: drawatpoint
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: drawatpoint


  • Subject: Re: drawatpoint
  • From: David Duncan <email@hidden>
  • Date: Sat, 2 Jan 2010 17:47:53 -0800

On Jan 2, 2010, at 5:34 PM, John Kundert-Gibbs wrote:

> I'm fairly new to programming for the iPhone (still getting up to speed!), and I have a hopefully simple question about positioning and scaling graphic images in a UIImageView I created in IB. I'm trying to work with drawAtPoint and drawInRect to position and size the image(s) (there will be 1 to 6 of them, depending). The code I have is something like this:
>
> resultImage.image = [[UIImage imageNamed:@"New_Image.png"] drawAtPoint:topLeft];

-drawAtPoint: does not return any value, rather it takes action on the current context (which only exists if you explicitly push a current context or are inside of -drawRect:). So this line of code doesn't make a whole lot of sense :).

If you want to position an image view (presumably 'resultImage') then move it using the UIView 'center' or 'frame' property. There are a fair number of samples that show this (look up the properties on UIView in the documentation for links to the samples).
--
David Duncan
Apple DTS Animation and Printing

_______________________________________________

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

References: 
 >drawatpoint (From: John Kundert-Gibbs <email@hidden>)

  • Prev by Date: drawatpoint
  • Next by Date: Re: drawatpoint
  • Previous by thread: drawatpoint
  • Next by thread: Re: drawatpoint
  • Index(es):
    • Date
    • Thread