Re: drawatpoint
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>) |