Reputation: 9472
I have a question about padding between views (when using AutoLayout).
How can I configure AutoLayout so that when content in block is missing, it should "turn off" block and its padding too?
For example when I set up vertical padding before and after to 10 pts, set empty string as content, I get label with 0 height and 20 pts of "padding" space around. Actually I want this view to be hidden.
Is it possible with Autolayout or I should manually hide/show view in content setter?
Upvotes: 2
Views: 156
Reputation: 150765
In this case I'd say you need to handle this in code. Autolayout deals with the layout of objects on a view. Adding or removing objects from a view is not the same thing.
Upvotes: 1