Group Group Group Group Group Group Group Group Group

raywenderlich.com Forums

OS X Stack Views with NSStackView

In this tutorial you will learn how to use stack views to design your OS X app's layout by leveraging the power of NSStackView.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/1206-os-x-stack-views-with-nsstackview
1 Like

SUCH A GREAT TUTORIAL.

Completed it in a breeze and made me decide that I’ll be porting my most popular iOS App to MacOS!

2 Likes

As wonderful as they are to use, I can’t use them for at least another year or so as our app policy is to support the current version of iOS (9), as well as the prior version (8), and sometimes even the version before that (7).

I wish Apple had figured out a way to build with the current library (9) but back port stack view functionality to iOS 8…

Really nice tutorial! Clearly outlines the usage and functionality of stack views. Much appreciated. :blush:

Some little correction: Under the title Stack View Animations the keyboard button talked about should the control and not Command.

Nice tutorial. Hope you keep publishing great OS X material.

1 Like

How did you manage the transparent/white window controller and the toggle list button to merge at top. My window controller frame looks grey at top & whenever I add the toolbar button, it adds huge space of toolbar with it. I tried to play with the window controllers attribute inspector for options such as “Unified title & toolbar” with no luck. My target version is 10.11 so that isn’t the issue.
Thanks

hey, if you check the code - in the view controller class you’ll see how to do that. Look into viewWillAppear

my bad, yep that works. Now the only thing is that the your show list button appears bright while my appears a little bit blurred. Any particular reason for that.

Hi newdriv,
look at the code in ViewController.swift. There he wrote this

if let window = view.window {
   window.titleVisibiltiy = .Hidden   // hides the TitleBar, therefore the attached toolbar is at the top
   window.titlebarAppearsTransparent = true     // the Toolbar gets transparent, so you see the window background (slightly grey)
   ...      
}
1 Like

Yeah, that’s right - apparently only the combination of the two properties provides the desired effect

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]