Button filling up stack view
<p>I'm following the <a href="https://developer.apple.com/library/content/referencelibrary/GettingStarted/DevelopiOSAppsSwift/ImplementingACustomControl.html" rel="nofollow noreferrer">dev tutorial</a> from Apple on iOS, and got to the part where you have to implement a custom control using a stack view. However, when I get to the part where it should show me a little red square referring to the button I added to the stack view, I get the whole stack view in red (the button fills the entire stack view). 
My attributes are the following:</p>

<p><a href="https://i.stack.imgur.com/Bf9z5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Bf9z5.png" alt="atrib"></a></p>

<p>What am I doing wrong, despite following the tutorial to the letter? Thank you in advance.</p>

<p>Edit:</p>

<p>I use these constraints:</p>

<pre><code>    button.translatesAutoresizingMaskIntoConstraints = false
    button.heightAnchor.constraint(equalToConstant: 24.0).isActive = true
    button.widthAnchor.constraint(equalToConstant: 14.0).isActive = true
</code></pre>