0

I've got a custom alert dialog based on TSAlertView (https://github.com/TomSwift/TSAlertView)

However when it gets displayed its appearance is very sudden and jarring, I tried adding some animation to it using the following code however it makes no difference (the following code has no effect at all, I could change the duration to N seconds or change the animation style to anything and it has no impact):

[UIView transitionWithView:self.view
                  duration: 0.5
                   options: UIViewAnimationOptionCurveEaseIn
                animations:^ { [self.view addSubview:dialog]; }
                completion:nil];
LuisCien
  • 6,362
  • 4
  • 34
  • 42
Gruntcakes
  • 37,738
  • 44
  • 184
  • 378

1 Answers1

2

Instead of adding the alert view as a subview in the animations block try changing it's alpha value. When you create the the AlertView set the alpha to zero and add it as a subview. Then, in the animation block, change the alpha value to one.

Hope this helps!

LuisCien
  • 6,362
  • 4
  • 34
  • 42