A
A
Alexander2018-03-03 12:55:41
Swift
Alexander, 2018-03-03 12:55:41

How to make it so that if there are several Labels, but there is no value in one of these Labels, then it is not displayed?

Actually the question is in the title) otherwise it turns out that the empty space remains and the size of the cell does not decrease

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stanislav Korolevskiy, 2018-03-03
@sasha1802

There is such a method - isHidden. Want to hide, then label.isHidden = true

M
Maxim Globak, 2018-03-04
@maximglobak

If you have it in the table, then you should think in advance about what you should display.
Some kind of data sorus, which, before displaying the cells on the screen, will calculate which should be displayed and which should not.
And keep it in a separate model.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question