Skip navigation.
 
mlRe: CAScrollLayer "Contents" Size
FROM : Matt James
DATE : Thu Mar 13 02:15:44 2008

On Wed, Mar 12, 2008 at 6:15 PM, Scott Stevenson <<email_removed>> wrote:
>
> > As a side note, is there any way to setup a layer so that it grows its
> > bounds based on sublayers added?  It seems silly to have all this
> > code to
> > constantly update the bounds so that references to height and width
> > of a
> > given layer are accurate for what I want.
>
> I actually don't think you want to keep growing the parent layer like
> that. It doesn't really have any practical benefit and it eats up
> resources. The parent layer generally only needs to be as big as the
> on-screen display area.



I guess I was thinking from an HTML perspective of adding an image within a
div and how the div grows automatically to contain the image.  I can
understand not clipping, but it seems counter-intuitive that a "superlayer"
can contain something larger than itself and not "grow" in response.  I'm
still getting used to this method of doing things, so it might take a while
to understand the alternative perspective. :)

Thanks again for the help!

-Matt James

Related mailsAuthorDate
mlCAScrollLayer "Contents" Size Matt James Mar 11, 17:18
mlRe: CAScrollLayer "Contents" Size Scott Stevenson Mar 11, 23:25
mlRe: CAScrollLayer "Contents" Size Matt James Mar 12, 02:34
mlRe: CAScrollLayer "Contents" Size Scott Stevenson Mar 12, 06:07
mlRe: CAScrollLayer "Contents" Size Matt James Mar 12, 12:56
mlRe: CAScrollLayer "Contents" Size Matt James Mar 12, 13:06
mlRe: CAScrollLayer "Contents" Size Scott Stevenson Mar 12, 23:15
mlRe: CAScrollLayer "Contents" Size Matt James Mar 13, 02:15
mlRe: CAScrollLayer "Contents" Size Scott Stevenson Mar 13, 04:08
mlRe: CAScrollLayer "Contents" Size Scott Stevenson Mar 13, 04:11