I have used storyboard with autolayout for my UI design. Basically in android there are three different properties will be there like Visible, Invis
if your view for example
@property (weak, nonatomic) IBOutlet SearchBarView *searchBar;
already has a constraint with it. Add a new IBLayout by dragging your constraint to the .h file.ex:
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *constraintSearBarHeight;
and do this in where ever you like
self.constraintSearBarHeight.constant = 0;
if your view don't have a constraint yet. I found this answer helpful. Just do below
[self.view addConstraint:[NSLayoutConstraint constraintWithItem:self.searchBar attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:0]];