Re: [self setLayer:] in initWithFrame:
Re: [self setLayer:] in initWithFrame:
- Subject: Re: [self setLayer:] in initWithFrame:
- From: Bill Dudney <email@hidden>
- Date: Fri, 22 Feb 2008 09:48:18 -0700
Hi Nate,
Glad it works!
You are correct that when you want to set up you own layer hierarchy
its best to leave that for awakeFromNib instead of setting the check
box. When you check that a view wants a layer in IB and then replace
it its just wasting creating that layer and such. Also I have
occasionally seen some strange behavior from views that had that
checkbox turned on in IB after I replace it's layer. I think that when
a view comes out of a nib thinking that its layer backed (instead of
layer hosting) it makes some assumptions about what it can do with/to
the layer that are not valid once you replace the layer.
So I have had better luck just leaving that checkbox unchecked in IB.
anyway sorry to ramble, good luck!
-bd-
http://bill.dudney.net/roller/objc
On Feb 21, 2008, at 9:11 PM, Nathan Vander Wilt wrote:
If you don't have layer backing turned on in the nib
file the view
loading machinery turns off layer backing after
initWithFrame: is
called.
Ah, that explains it!
From my understanding (and the docs don't elaborate on
this much at all), I *don't* want to do that, since I
need to provide my own layer before calling
wantsLayer:, correct?
thanks,
-natevw
____________________________________________________________________________________
¡Capacidad ilimitada de almacenamiento en tu correo!
No te preocupes más por el espacio de tu cuenta con Correo Yahoo!:
http://correo.espanol.yahoo.com/
_______________________________________________
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