On 19 Feb 2010, at 03:50, Scott Anguish wrote:
>
> On Feb 16, 2010, at 5:45 PM, Simon Wolf wrote:
>
>>>
>>> I'm wondering when writing a layer hosting view, when the most appropriate
>>> time is to set the layer and call -setWantsLayer:YES?
>>>
>>> Calling it in -initWithFrame: is too early a
On Wed, 17 Feb 2010 17:07:54 -1000, Dave Keck said:
>> Maybe I'm misunderstanding, but I'm wondering, why not put everything into a
>> single method and call that method from both initWithFrame and awakeFromNib?
>> One and only one of these will be called (depending whether you are
>> instantiatin
On Feb 16, 2010, at 5:45 PM, Simon Wolf wrote:
>>
>> I'm wondering when writing a layer hosting view, when the most appropriate
>> time is to set the layer and call -setWantsLayer:YES?
>>
>> Calling it in -initWithFrame: is too early and the view fails to 'draw'.
>
> In addition to David's r
On 17 Feb 2010, at 09:23, Keith Duncan wrote:
>
> On 16 Feb 2010, at 21:40, David Duncan wrote:
>
>>> Calling it in -initWithFrame: is too early and the view fails to 'draw'.
>>
>> If you are creating the view programmatically, -initWithFrame: should be
>> fine. If your loading from a nib, the
Hi Keith,
In addition to David's reply, a small tip is that you can also get things
working if you call setWantsLayer: and then follow it by assigning a layer:
[self setWantsLayer:YES];
[self setLayer:[CALayer layer]];
Otherwise the layer is added at some undetermined future point which may not
On Wed, Feb 17, 2010 at 4:23 AM, Keith Duncan wrote:
>
> On 16 Feb 2010, at 21:40, David Duncan wrote:
>
>>> Calling it in -initWithFrame: is too early and the view fails to 'draw'.
>>
>> If you are creating the view programmatically, -initWithFrame: should be
>> fine. If your loading from a nib,
> Maybe I'm misunderstanding, but I'm wondering, why not put everything into a
> single method and call that method from both initWithFrame and awakeFromNib?
> One and only one of these will be called (depending whether you are
> instantiating in code or in a nib), so your single method will be cal
> That's actually a more distilled version of my question. When your layer
> hosting view may be instantiated programatically, or from a NIB; there is no
> good place that covers both since the -init methods are too early (I haven't
> needed to test -initWithCoder: yet).
>
> Nor have I determine
On Wed, 17 Feb 2010 09:23:57 +, Keith Duncan
said:
>
>On 16 Feb 2010, at 21:40, David Duncan wrote:
>
>>> Calling it in -initWithFrame: is too early and the view fails to 'draw'.
>>
>> If you are creating the view programmatically, -initWithFrame: should be
fine. If your loading from a nib, t
On 16 Feb 2010, at 21:40, David Duncan wrote:
>> Calling it in -initWithFrame: is too early and the view fails to 'draw'.
>
> If you are creating the view programmatically, -initWithFrame: should be
> fine. If your loading from a nib, then -awakeFromNib is the appropriate place.
That's actuall
On Feb 16, 2010, at 12:52 PM, Keith Duncan wrote:
> I'm wondering when writing a layer hosting view, when the most appropriate
> time is to set the layer and call -setWantsLayer:YES?
>
> Calling it in -initWithFrame: is too early and the view fails to 'draw'.
If you are creating the view progr
I'm wondering when writing a layer hosting view, when the most appropriate time
is to set the layer and call -setWantsLayer:YES?
Calling it in -initWithFrame: is too early and the view fails to 'draw'.
Keith
___
Cocoa-dev mailing list (Cocoa-dev@lists
12 matches
Mail list logo