iOS equivalent for Android View.GONE visibility mode

前端 未结 13 763
臣服心动
臣服心动 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 19:59

    Adding a constraint(NSLayoutAttributeHeight) that sets height of the view to 0 worked for me:

    [self.view addConstraint:[NSLayoutConstraint constraintWithItem:self.captchaView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:0]];
    

提交回复
热议问题