In my app i want to show a view coming from bottom. So for that i have animated the bottom constraints. The animation works fines but the issue is that the margin is not proper
original view
The issues is that the buttons are not in center
Code
let translate = CGAffineTransformMakeTranslation(0, -(view.frame.height/2 - view.center.y/4 + 20))
let scale = CGAffineTransformMakeScale(0.7, 0.7);
let transform = CGAffineTransformConcat(translate, scale)
UIView.animateWithDuration(0.6, delay: 0, options: .CurveEaseInOut, animations: {
self.ivLogo.transform = transform
}, completion:nil)
self.view.layoutIfNeeded()
//self.loginSignUpView.layoutIfNeeded()
UIView.animateWithDuration(1.0, delay: 0, options: .CurveEaseInOut, animations: {
self.loginSignUpBottomConst.constant=30
self.loginSignUpView.layoutIfNeeded()
self.view.layoutMarginsDidChange()
}, completion: nil)
}