title: animate UIStackView to slide in from top
body: <p>I have a navigation bar with a <code>BarButton</code> that should act as a menu button set up in story board.</p>
  
  <p>When its clicked i have a function creating a stack view with the menu items (<code>UIButtons</code>) as its arranged subviews. In addition constraints for top, bottom, trailing and leading are added through a function called from within the <code>createStackView</code> function. </p>
  
  <p>Here is the code:</p>
  
  <pre><code>let menuArray : [String] = ["a", "b" , "c", "d"]
  
  func buttonWtitle(title : String) -&gt; UIButton {
      let button = UIButton()
      button.setTitle(title, for: .normal)
      button.backgroundColor = UIColor.lightGray
      return button
  }
  
  func createButtons() -&gt; [UIButton]{
      var menu = [UIButton]()
      for title in menuArray{
          menu.append(buttonWtitle(title: title))
      }
      return menu
  }
  
      func createMenu(parentview : UIView){
      let buttonArray = createButtons()
      let stackView = UIStackView(arrangedSubviews: buttonArray)
      stackView.axis = .vertical
      stackView.distribution = .fillEqually
      stackView.alignment = .fill
  
      addSubviewWithConstraints(to: parentview, and: stackView, top: 0 , bottom:0, leading: 0, trailing: 0) //this function adds constraints   
  }
  </code></pre>
  
  <p>This is in its own class and its called from <code>ViewController</code> by the bar button.</p>
  
  <p>Everything is working fine but I am trying to animate it so it comes from the top of the screen. Is there a way to do that with a stackView?</p>