> On Dec 6, 2016, at 1:24 PM, David Duncan <david.dun...@apple.com> wrote: > > Your safest bets are to either clear the delegate of the layer at an > appropriate time (possibly in your view controller’s dealloc is all that is > necessary), or to use a UIView instead of a raw CALayer in this case. > Removing the layer would also suffice, as that would prevent UIKit from > seeing it at the time in question. Making the layer weak is probably causing > your reference to deallocate before it can be added to the layer tree, which > is why it doesn’t display in that case.
Thanks for this explanation, David! I've verified that using either of: [self.layer setDelegate:nil]; or [self.layer removeFromSuperlayer]; will prevent the crash. It's just a bit surprising to me that this is needed... -Carl _______________________________________________ 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