On Mon, Aug 15, 2011 at 2:47 PM, Rick Mann <rm...@latencyzero.com> wrote: > Hi. I have two UIView hierarchies, visually side-by side, but at different > parts of an overall view hierarchy. I'd like to create a single UIImage of > the two, using -renderInContext: and > UIGraphicsGetImageFromCurrentImageContext(). I was able to make one work > alone just fine. But when I make my graphics context (using > UIGraphicsBeginImageContext()) large enough to encompass both, and set each > UIView's frame so that they are side-by-side, the resulting image shows just > the left-cell's content, squished horizontally.
Yes, but you need to set up the CTM to draw the layers in the right place. To be clear, you're asking the views' layers to -renderInContext:, not the views themselves. We use -renderInContext: to draw entire layer trees into one big context. You obviously aren't doing the same thing, but the principle is identical. You might want to look into our CALayer extension method for doing so: https://github.com/omnigroup/OmniGroup/blob/master/Frameworks/OmniQuartz/CALayer-OQExtensions.m#L497 --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com