Re: clipping and scrolling
Re: clipping and scrolling
- Subject: Re: clipping and scrolling
- From: David Duncan <email@hidden>
- Date: Tue, 16 Aug 2011 16:06:19 -0700
On Aug 12, 2011, at 4:27 AM, Torsten Curdt wrote:
> 1) I could just create an UIImageView and just move the origin into the negative. The clipping happens naturally through the parent view.
This is basically re-inventing the wheel, except that users won't fully understand what your re-invention has to offer.
> 2) I could use a UIScrollView and add the large UIImageView to it and move the content offset
Least code, works as users expect, almost certainly the best solution :).
> 3) I could have a custom view that basically just draws a portion of the image. Something along the lines of
This is SLOW. UIKit uses Core Animation to back its views, and Core Animation caches content for speedy redraw in hardware. By re-drawing your image you are defeating all of these optimizations. Even if you have really large content, it would be better to use multiple image views rather than drawing the subsection you need manually.
--
David Duncan
_______________________________________________
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