# OS X Stack Views with NSStackView

**URL:** <https://forums.kodeco.com/t/os-x-stack-views-with-nsstackview/13613>\
**Category:** 🎓 Courses & Articles\
**Created:** [April 19, 2016, 1:01pm UTC](https://forums.kodeco.com/t/os-x-stack-views-with-nsstackview/13613 "2016-04-19T13:01:27Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![icanzilb](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/icanzilb/32/109333_2.png) [@icanzilb](https://forums.kodeco.com/u/icanzilb)\
**Post date:** [April 19, 2016, 1:01pm UTC](https://forums.kodeco.com/t/os-x-stack-views-with-nsstackview/13613/1 "2016-04-19T13:01:27Z")

</div>

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](https://www.raywenderlich.com/1206-os-x-stack-views-with-nsstackview)

---

<div class="post-metadata">

**Author:** ![jarocep](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jarocep/32/10221_2.png) [@jarocep](https://forums.kodeco.com/u/jarocep)\
**Post date:** [April 20, 2016, 12:43am UTC](https://forums.kodeco.com/t/os-x-stack-views-with-nsstackview/13613/2 "2016-04-20T00:43:38Z")

</div>

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!**

---

<div class="post-metadata">

**Author:** ![hmlongvo](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/hmlongvo/32/93952_2.png) [@hmlongvo](https://forums.kodeco.com/u/hmlongvo)\
**Post date:** [April 20, 2016, 6:27pm UTC](https://forums.kodeco.com/t/os-x-stack-views-with-nsstackview/13613/3 "2016-04-20T18:27:57Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![c\_surmeli](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/c_surmeli/32/31024_2.png) [@c\_surmeli](https://forums.kodeco.com/u/c_surmeli)\
**Post date:** [April 21, 2016, 11:30am UTC](https://forums.kodeco.com/t/os-x-stack-views-with-nsstackview/13613/4 "2016-04-21T11:30:42Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![aalbers](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/aalbers/32/79544_2.png) [@aalbers](https://forums.kodeco.com/u/aalbers)\
**Post date:** [April 23, 2016, 9:02pm UTC](https://forums.kodeco.com/t/os-x-stack-views-with-nsstackview/13613/5 "2016-04-23T21:02:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![newdriv](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/newdriv/32/40400_2.png) [@newdriv](https://forums.kodeco.com/u/newdriv)\
**Post date:** [September 1, 2016, 2:17pm UTC](https://forums.kodeco.com/t/os-x-stack-views-with-nsstackview/13613/6 "2016-09-01T14:17:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![icanzilb](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/icanzilb/32/109333_2.png) [@icanzilb](https://forums.kodeco.com/u/icanzilb)\
**Post date:** [September 1, 2016, 3:22pm UTC](https://forums.kodeco.com/t/os-x-stack-views-with-nsstackview/13613/7 "2016-09-01T15:22:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![newdriv](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/newdriv/32/40400_2.png) [@newdriv](https://forums.kodeco.com/u/newdriv)\
**Post date:** [September 3, 2016, 6:59am UTC](https://forums.kodeco.com/t/os-x-stack-views-with-nsstackview/13613/8 "2016-09-03T06:59:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pintiboy](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/pintiboy/32/90521_2.png) [@pintiboy](https://forums.kodeco.com/u/pintiboy)\
**Post date:** [September 8, 2016, 12:24pm UTC](https://forums.kodeco.com/t/os-x-stack-views-with-nsstackview/13613/9 "2016-09-08T12:24:09Z")

</div>

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)
   ...      
}

```

---

<div class="post-metadata">

**Author:** ![icanzilb](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/icanzilb/32/109333_2.png) [@icanzilb](https://forums.kodeco.com/u/icanzilb)\
**Post date:** [October 2, 2016, 8:16am UTC](https://forums.kodeco.com/t/os-x-stack-views-with-nsstackview/13613/10 "2016-10-02T08:16:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [November 15, 2017, 9:25pm UTC](https://forums.kodeco.com/t/os-x-stack-views-with-nsstackview/13613/11 "2017-11-15T21:25:38Z")

</div>

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! :]

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [November 15, 2017, 9:25pm UTC](https://forums.kodeco.com/t/os-x-stack-views-with-nsstackview/13613/12 "2017-11-15T21:25:41Z")

</div>


