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 6197751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:52:38+00:00 2026-05-24T03:52:38+00:00

I have not done much animation, and I need some help with this. I

  • 0

I have not done much animation, and I need some help with this. I have a tabBarController as my root controller, and I want to have another tabBarController, and I want to bring it up as a Modal View Controller, and I have a problem with the animation.

There are currently four animations for modalViewControllers, namely

typedef enum {
UIModalTransitionStyleCoverVertical = 0,
UIModalTransitionStyleFlipHorizontal,
UIModalTransitionStyleCrossDissolve,
UIModalTransitionStylePartialCurl,
} UIModalTransitionStyle;

I want a different animation – slide from the right to the left. – How can I do this animation?

Any help with this?


Edit:

My idea to push a tabBarController onto the navigation stack sucks! Apple’s comment on this approach:

You never want to push a tab bar controller onto the navigation stack of a navigation controller. Doing so creates an unusual situation whereby the
tab bar appears only while a specific view controller is at the top of the navigation stack. Tab bars are designed to be persistent, and so this transient approach can be confusing to users.

I am out of ideas. Someone help me with the animation for modal view controllers.

  • 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-24T03:52:39+00:00Added an answer on May 24, 2026 at 3:52 am

    You could write the animation code manually. Here are the general steps:

    • Create a subclass of UIViewController (essentially a dud controller to house your UITabBarController) – I usually call this ShellViewController.
    • In the ShellViewController‘s init method (whichever one you would use), set its frame outside of the screen to the right, e.g. [self.view setFrame:CGRectMake(320, 0, 320, 480)];
    • Create two methods within ShellViewController
      • - (void)presentSelf
      • - (void)dismissSelf
    • Create an instance of ShellViewController when you want to present your UITabBarController
    • Place your UITabBarController instance inside of the ShellViewController instance
    • Call [currentView addSubview:shellViewController.view];
    • Use the custom methods above to present and dismiss the ShellViewController housing your UITabBarController
    • Deal with memory management as your business logic dictates

    Here is the code for animating-in (e.g. the - (void)presentSelf method):

    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.15]; //the double represents seconds
    [UIView setAnimationDelegate:self];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
    [[self view] setFrame:CGRectMake(0, 0, 320, 480)];
    [UIView commitAnimations];
    

    Here is the code for animating-out (e.g. the - (void)dismissSelf method):

    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.15];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
    [[self view] setFrame:CGRectMake(320, 0, 320, 480)];
    [UIView commitAnimations];
    

    Keep in mind that these animation methods do only that: animate. They don’t disable interaction with the current view nor with the ShellViewController‘s view/subviews which are being animated in/out. You’ll need to manually disable user interaction during animation and then reinstate it after the animation is finished. There is a UIView method that performs a selector when animation is finished:

    [UIView setAnimationDidStopSelector:@selector(enableUserInteraction)];
    

    You can put this right after the [UIView setAnimationDelegate:self] in each animation block above. Of course, you would need to write the enableUserInteraction method yourself… and disableUserInteraction method for that matter.

    It is a hassle to go this route, but it works. Once you get the ShellViewController written up, it makes for a nice reusable snippet.

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

Sidebar

Related Questions

I would appreciate some help with something I working on and have not done
I have not done much database programming at all. I am working from some
I have not done any animation stuff with iphone development so far. Can anybody
I want to do a simple drag-drop using jQuery. I have not done anything
I have done some work with Ruby on Rails but am still not comfortable
I have not done much on Ajax before and was wondering if I could
I have not really done much programming with Core Graphics. And I tend to
I'm trying to do some validation on 2 numerical fields and not done much
I have NOT done much of web-developing and I would like to learn about
Question as I have not done much with vectors and templates. If I have

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.