Not sure if there is a simpler way to do this, but if you have a button and you don’t want it to fill the entire StackView width and height, place it inside another view within the stackView and set leading/trailing/top/bottom constraints on it it.

Screen Shot 2017-07-09 at 7.34.40 PM.png