On Thu, Aug 23, 2012 at 11:23 AM, Kyle Sluder <k...@ksluder.com> wrote: > On Aug 22, 2012, at 5:21 PM, Koen van der Drift <koenvanderdr...@gmail.com> > wrote: > >> I'd like to add some custom text highlighting to my NSTextView, so I added >> the following code to the NSTextView init method: >> >> CALayer *aLayer = [CALayer layer]; >> [self setWantsLayer: YES]; >> [self setLayer: aLayer]; > > This isn't going to work. The nib loading machinery enumerates all your views > and calls -setWantsLayer: after it has initialized all of them. Put this code > in -awakeFromNib instead. (Do you really need to subclass NSTextView here?)
See my response earlier, removing this code completely and turning on CA in IB did the trick. - Koen. _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com