NSView.wantsLayer documentation needs update

Number:rdar://32698385 Date Originated:11-Jun-2017 12:39 AM
Status:Open Resolved:
Product:macOS + SDK Product Version:Version 9.0 beta (9M136h) / 10.13 Beta (17A264c)
Classification:Other Bug Reproducible:Always
Dear Documentationeros,

The NSView.wantsLayer documentation, as of Xcode 9 beta 1 / macOS 10.13 beta 1, still says this:

> Creating a layer-backed view implicitly causes the entire view hierarchy under that view to become layer-backed. Thus, the view and all of its subviews (including subviews of subviews) become layer-backed. The default value of this property is false.

However, as of macOS 10.13 beta 1, setting wantsLayer on a view does *not* guarantee that all of the view’s subviews get layers. This is a pretty big change in the behavior of both NSView.wantsLayer and NSView.layer.

The wantsLayer documentation needs to be updated to explain the new behavior, and (since this change can cause crashes in formerly-correct apps) the change should be called out in a pretty big way in the documentation for both wantsLayer and the layer property.


Steps to Reproduce:

Expected Results:

Actual Results:

Version 9.0 beta (9M136h) / 10.13 Beta (17A264c)



Are you certain that it's a documentation bug and not a bug in the behavior itself? Did Apple announce the new behavior in a WWDC talk or something?

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!