Hi Matt,
On 3/21/18 18:40, Matt Jacobson wrote:
Hi Markus,
There's really no official distinction these days between a layer-hosting view and a
regular view. A view may have a layer (provided by directly calling -setLayer:), or
AppKit may (or may not, depending on the exact circumstances) give it a layer automatically.
Either way, the view is subject to the same rules about what properties of that layer it
may mutate (vs. those AppKit "owns")—see
<https://developer.apple.com/library/content/releasenotes/AppKit/RN-AppKit/#10_13Layer-backed%20Views
<https://developer.apple.com/library/content/releasenotes/AppKit/RN-AppKit/#10_13Layer-backed
Views>>.
And either way, the view may certainly have subviews. We'll update the incorrect
documentation—thanks for pointing that out.
That's certainly very helpful, thanks! Question is, can I rely on this working alright as
far back as macOS 10.10 (which is my current deployment target), or will this be asking
for trouble?
What I have - and that works on 10.13:
Window
| -- Custom Content View
| -- Visual Effects view
| -- Custom View containing NSButtons, NSTextField, etc.
| -- Custom View containing NSButtons, NSTextField, etc.
| -- Custom View containing NSButtons, NSTextField, etc.
My custom content view is used to clip corners to a nice radius. The view class is set in
IB. The window is of a border-less, background-less custom window class.
Thanks again!
Best Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________
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