I'd like to know what's the cleanest way to remove a view from a stack view if a certain property in my data model is nil
. I have a table view which is populated by prototype cells. They look like this:
The second label text contains an optional value which may be nil
; I want to hide the label if it's nil. Should I call removeArrangedSubview
inside the cellForRow
table view cell method or inside the CustomTableViewCell
class with a function?