I tried setting only that in IB. I also tried setting everything in that view nib. OriginalLayer is non-nil in the trace, but, as you see, gets replaced with the one with color background.
On 12/2/12 5:48 PM, "Kyle Sluder" <k...@ksluder.com> wrote: > On Sun, Dec 2, 2012, at 03:07 PM, Gordon Apple wrote: >> > I have a simple subview in my NSCollectionView prototype. (Collection >> > view >> > is in a popover. Popover launched from a floating control panel.) It >> > contains the following: >> > >> > - (void) awakeFromNib { >> > CALayer *originalLayer = self.layer; >> > CALayer *newLayer = [CALayer layer]; >> > newLayer.backgroundColor = [[NSColor magentaColor] CGColor]; >> > self.layer = newLayer; >> > self.wantsLayer = YES; >> > // [self getThePlayer]; >> > // [self addPlayerLayer]; >> > } >> > >> > Code gets executed, but no visible color. originalLayer is nil. >> > Commented >> > code is for testing. If I can¹t simply get a color layer to work, >> > there¹s >> > no chance of that working. I¹ve tried adding a sublayer with color >> > background no go. Controls in collection view work just fine. >> > >> > I¹m reasonably well versed in CALayers and have used them extensively. >> > Is >> > there any reason why this doesn¹t work? > > Did you enable layer-backing on the enclosing scroll view? > > --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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com