• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Layer-hosting views as superview?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Layer-hosting views as superview?


  • Subject: Re: Layer-hosting views as superview?
  • From: Markus Spoettl <email@hidden>
  • Date: Wed, 21 Mar 2018 19:28:41 +0100

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 Views <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 (email@hidden)

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:

This email sent to email@hidden

References: 
 >Layer-hosting views as superview? (From: Markus Spoettl <email@hidden>)
 >Re: Layer-hosting views as superview? (From: Markus Spoettl <email@hidden>)
 >Re: Layer-hosting views as superview? (From: Matt Jacobson <email@hidden>)

  • Prev by Date: Re: Layer-hosting views as superview?
  • Next by Date: Harmful Notification Post Rate
  • Previous by thread: Re: Layer-hosting views as superview?
  • Next by thread: Harmful Notification Post Rate
  • Index(es):
    • Date
    • Thread