I am trying to dismiss a UIView
that I have previously added using the same animation block with a fade from alpha 0 -> alpha 100
and [self.view addSubview:newInitiateWindow.view];
The animation block executes correctly when the window is created, but when it is being dismissed, it just halts for 0.75 seconds and then disappears without ever animating. Even if I remove the removeFromSuperview
and release calls it doesn't animate the fade to transparent.
Here is the code that should be generating the animation:
[UIView transitionWithView:newInitiateWindow.view
duration:0.75
options:UIViewAnimationOptionCurveEaseIn
animations:^{
newInitiateWindow.view.alpha = 0;
}
completion:^(BOOL finished){
if(finished){
[newInitiateWindow.view removeFromSuperview];
[newInitiateWindow release];
newInitiateWindow=nil;
}
}
];