moonvader
moonvader

Reputation: 21081

Proper UI elements hiding

I've some list of UI items - they placed one under another. Right now each of this UI items have top space constraint to previous item. Some of items can be hidden according to data received from server.

How should i hide elements in this case so there will be no empty spaces in interface.

P.S I know few ways to do this technically (change top constraints values from code or hide element by "hidden" property), my question is not about how it could but how it should be done.

Upvotes: 0

Views: 81

Answers (1)

Sofeda
Sofeda

Reputation: 1371

Setup those UI element in UIStackView.Then when you will hidden them they will not leave empty space.

Inside the UIStackView you also have to use the hidden property of those UI elements.

Upvotes: 1

Related Questions