I did a bit of work around this, but actually did not answer my question (not even that: Is it possible to remove FromSuperview with animation? ).
Basically, my application starts with a welcome screen where the user clicks “Register”, then goes to the sign, and then goes to the tab bar view, which is the actual application.
As I did this, I wrote my own class - TabBarController, which sets all the tabs and their respective view controllers. Now, when the user clicks "Register", I call removeFromSuperview and present the tab.
I am trying to find a way to animate the transition from a character on a page to a tab bar. I tried some of the suggested solutions here, but no one seems to be doing this work. Here is my code in the signin.m controller. I am looking to animate the current view (ideally, not only attenuation, but also cooler things like flips, etc.).
//when done signing in --> go to the tab bar view -(IBAction)done:(id)sender { TabBarController *tabController = [[TabBarController alloc] init]; [UIView beginAnimations:@"removeWithEffect" context:nil]; [UIView setAnimationDuration:4.0]; self.parentViewController.view.frame = CGRectMake(0,0,320,480); self.parentViewController.view.alpha = 1.0f; [UIView commitAnimations]; [self.parentViewController.view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:2.5f]; [self presentModalViewController:tabController animated:YES]; }
Appreciate any help!
source share