AutoLayout with hidden UIViews?

后端 未结 13 1388
南方客
南方客 2020-11-27 09:27

I feel like it\'s a fairly common paradigm to show/hide UIViews, most often UILabels, depending on business logic. My question is, what is the best

13条回答
  •  温柔的废话
    2020-11-27 10:12

    I just found out that to get a UILabel to not take up space, you have to hide it AND set its text to an empty string. (iOS 9)

    Knowing this fact/bug could help some people simplify their layouts, possibly even that of the original question, so I figured I'd post it.

提交回复
热议问题