I'm implementing a feature where the user can customize the appearance of news posts by deciding what information to be displayed. I use stack views and as you can see in the first picture there are a facebook and a twitter icon stored in a horizontal stack view. When hiding the twitter link the entire stack view disappears. It works flawlessly when hiding vertical elements as can be seen in the last picture where the image was hidden without the entire stack view disappearing. Does anyone know why this happens? I tested setting alpha instead of hidden but that has even worse behavior as then the stack view won't disappear when both buttons are hidden.
Hiding one button in horizontal stack view causes the stack view to disappear
You should figure out a better way to describe your issue. Images are not allowed in the forums.
My guess, based on what you've said, is you're hiding the stack view not the individual elliment.
Check your code.
That sounds like it should be the obvious explanation. However I don't have any references to the stack views, only to the elements contained within them and I'm definitely setting the hidden properties on the buttons, not the stack view. Funny that images can be embedded within a post but not allowed to be posted.
I know this was a long time ago but did you ever figure it out? I'm seeing the same thing on the latest version of iOS (11.1.1) and Xcode.
If I change my UIStackView to vertical, it works as expected but when I set it back to the horizontal mode, the whole thing disappears from view.