10.10 List of sources that goes through the TitleBar?

Just curious how to accomplish this kind of custom column view. The source list goes straight through the header, but on one side only, I'm guessing they hid the header, perhaps and then used NSVisualEffectView? Any source code or advice is appreciated, its pretty cool and from what I see a pretty widely used UI Element for Yosemite apps.

Translucent source list that goes straight through NSTitleBar

The search bar in this photo and the "Add List" button are obviously in different views, and I fully understand that NSOutlineView with SourceList style will automatically create such an effect in 10.10, but the button and search box cannot be in the scrolling area of ​​the source list. but their background is consistent with that from the original list, which makes me think that this effect is more presentation based than original list based.

+3


source to share


1 answer


Ok, so I answered this myself. I created a github repository here to show others how easy it is to create the effect I was looking for to create.

Tri-Transarent-Window

The main point is to create an NSVisualEffectsView and then just hide the title and set the title mask.

@implementation AppDelegate

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
// Insert code here to initialize your application

self.window.styleMask = self.window.styleMask | NSFullSizeContentViewWindowMask;
self.window.titleVisibility = NSWindowTitleHidden;
self.window.titlebarAppearsTransparent = YES;

}

      



The above code will cause the window to take over the view and it will automatically expire through the title bar. Here is my XIB

enter image description here

When you launch, you get a sidebar styled transparent view that runs through the header.

enter image description here

+7


source







All Articles