0

I'm working on a app with a combined login/signup screen. When the user taps "Sign up" at the bottom, a birth date field and a terms of service checkbox appear below the email and password field so the user can sign up. The problem I'm having is that when I animate the stack view containing the birth date text field and terms of service view, they animate from the top of the email text field even though they are located below the password text field.

enter image description here

Code:

[UIView animateWithDuration:animated == YES ? 0.4 : 0 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
        self.signUpFieldsStackView.hidden = NO;
        self.signUpFieldsStackView.alpha = 1;
    } completion:nil];

These controls are nested inside UIStackView's like so:

  • UIStackView
    • UIStackView
      • UIStackView (loginFieldsStackView)
        • email text field
        • password text field
      • UIStackView (signUpFieldsStackView)
        • birth date text field
        • terms of service view
    • Login button
    • UIView
      • "Don't have an account" label
      • "Sign up" button
Jake
  • 13,097
  • 9
  • 44
  • 73

0 Answers0