I want a view to fade in when being added to the stack via
[self.view addSubview:someSecondaryViewController.view];
How do I animate this call so that the view fades in (and out)?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Set the alpha to zero before animating, then animate the alpha to one.
Before removing the view, just animate the alpha back to zero.
BTW, the view hierarchy is more of a tree than a stack.
Edit:
If you have no other cleanup after the animation ends when fading out the view, then use:
If you are already setting a didStopSelector then call removeFromSuperview there.