On Tue, May 17, 2011 at 11:35 AM, Bill Cheeseman <wjcheese...@gmail.com> wrote: > I agree that the explanation doesn't logically lead to a prohibition on > creating layers in -initWithFrame:. That's why I initially created them > there, deferring only the construction of the layer tree to -awakeFromNib. > But I suffered random failures -- in fact, the application failed more often > than not. The randomness is consistent with my doing something to which the > phrase "undefined behavior" is often applied in Apple documentation. Now that > I've moved the layer creation to -awakeFromNib, however, my application is > working correctly 100% of the time.
You could also try using -makeBackingLayer. That's useful if your view can be used both programmatically and in a nib. --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com