An object that manages a custom view—known as an accessory view—in the title bar–toolbar area of a window.
Because a title bar accessory view controller is contained in a visual effect view (that is, NSVisualEffectView), it automatically handles the blur behind the accessory view and the size and location changes for the content of the view when a window goes in and out of full screen mode. If you’re currently using NSToolbar fullscreen accessory APIs, such as fullScreenAccessoryView, you should use NSTitlebarAccessoryViewController APIs instead.
Typically, you create an NSTitlebarAccessoryViewController object, give it your custom view, set the layoutAttribute property to ensure that it displays correctly in relation to the title bar, and add the view controller to your window. For more information about NSWindow methods you can use to add and remove a title bar accessory view controller, see Managing Title Bars.
Don’t override the view property in your NSTitlebarAccessoryViewController subclass. Instead, you can override loadView, and set the view property in that method.