Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6191955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:51:35+00:00 2026-05-24T02:51:35+00:00

I did some digging around about this, but nothing really seems to answer my

  • 0

I did some digging around about this, but nothing really seems to answer my particular question (not even this: Is it possbile to removeFromSuperview with Animation?).

Basically, my app starts with a welcome screen, where a user clicks on “sign in”, then goes to the sign in view, then getting to a tab bar view, which is the actual app.

The way I did it, is that I wrote a custom class – TabBarController, which sets up all the tabs and their respective view controllers. Now, when the user clicks on “sign in” i am calling removeFromSuperview and present the tabbar.

I am trying to find a way to animate the transition from the sign in page to the tab bar. I tried some proposed solutions around here, but none seems to do the job. Here is my code in the signin.m view controller. I am looking to animate out the current view (ideally, not just by fading out, but more cool stuff 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!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:51:35+00:00Added an answer on May 24, 2026 at 2:51 am

    That can’t work that way. presentModalViewController dislpays the view of a viewController over the own view. It won’t replace the source viewController (self).
    Since you remove self.parentViewController.view from the view hierarchy, it can’t present your tabController modally because you have removed self.

    Anyway, i would recommend you another way to achieve your view layout:
    Create a tabBarViewController and add its view to a rootView (self.window in the app delegate or whatever you are using now). Then add your login-view to the same view. Due the view hierarchy, the login-view will be displayed above the tabBar.view. And the done button should be implemented this way: (i’m using block syntax for animation as it should be)

    -(IBAction)done:(id)sender {
        [UIView animateWithDuration:1.0 
                         animations:^{
                             self.view.frame = CGRectMake(0, 480, 320, 480);
                             self.view.alpha = 0.0
                         } 
                         completion:^(BOOL finished){
                             [self.view removeFromSuperView];
                         }
         ];
    }
    

    You can animate more things than just the alpha, size or position. Just take a look about animations in the documentation. I guess, you’ll be interested in view.transform to commit flip animations. 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I did some googling to try to answer this question but even after that
A followup to another question I did, I've done some more digging but I
Not sure if this has been asked before, did some digging. I'm trying to
Did some googling and couldn't find a clear answer on this. My assumption is
I'm sorry if this has been asked before, but I did try digging through
Did some searches here & on the 'net and haven't found a good answer
I did some HTTP monitoring with WireShark. Are there more tools like this that
I did some timing tests and also read some articles like this one (last
I was looking at this code and had a few questions. I did some
Cheers all! I'm quite new to Django, but I've been digging around for few

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.