I have some problems with the autolayout when I try to animate a UIView for iPhoneX .. As you can see in the first image my UIView is closed down and so I got what I want ...
RESULT
In the second image I try to open up my UIView but as you can see the space remains at the bottom, instead on iphone 7 plus there is no space left ..
How can I extend the length of my uiview to cover the missing space of the bottom?
I've already tried to change my first item from Safe Area in Superview but this creates another problem for me because when my uiview is closed it's too much down compared to iphone 7 plus ...
RESULT
what I would need is to have a result like this
Can you help me ?
Solved with self.view.safeAreaInset.bottom
...
When the UIView is closed I animate the constraint (loginPanelBottomConstraint) in this way :
[UIView animateWithDuration:.3 animations:^{
self.loginPanelBottomConstraint.constant = 0 + self.view.safeAreaInsets.bottom;
[self.view layoutIfNeeded];
}];
When the panel is Open :
[UIView animateWithDuration:.3 animations:^{
self.loginPanelBottomConstraint.constant = 245
[self.view layoutIfNeeded];
}];