Xcode IB: UIButton hidden but have still buttons space

后端 未结 6 1776
悲哀的现实
悲哀的现实 2021-02-15 18:22

I have the following issue in my iPhone app. I have 4 buttons in my IB also linked to my UIViewController (IBOutlet) When I for example hide the second

6条回答
  •  囚心锁ツ
    2021-02-15 18:55

    1. You can add the buttons programmatically -> you will have the array of Btns and method to add array to the view controller.
    2. You can play with the Constraints and set Height Constraint for 2nd button when hide it to 0 but all buttons should be connected with the constraints in this case.

提交回复
热议问题