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
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 mails | Author | Date |
|---|---|---|
| Matt James | Mar 11, 17:18 | |
| Scott Stevenson | Mar 11, 23:25 | |
| Matt James | Mar 12, 02:34 | |
| Scott Stevenson | Mar 12, 06:07 | |
| Matt James | Mar 12, 12:56 | |
| Matt James | Mar 12, 13:06 | |
| Scott Stevenson | Mar 12, 23:15 | |
| Matt James | Mar 13, 02:15 | |
| Scott Stevenson | Mar 13, 04:08 | |
| Scott Stevenson | Mar 13, 04:11 |






Cocoa mail archive

