iOS equivalent for Android View.GONE visibility mode

前端 未结 13 780
臣服心动
臣服心动 2020-12-12 19:22

I\'m developing an app for iOS and I\'m using the Storyboard with AutoLayout ON. One of my view controllers has a set of 4 buttons, and in certain circumstances i would like

13条回答
  •  心在旅途
    2020-12-12 20:10

    add a height constraint to your view as follows:

    then make an outlet for the height constraint in your viewController file as follows:

    & then in your viewDidLoad method change constraint height to 0 as follows:

    override func viewDidLoad() {
        super.viewDidLoad()
    nsLcButtonHeight.constant = 0
    }
    

提交回复
热议问题