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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:35:22+00:00 2026-06-17T02:35:22+00:00

I am working on adding some functionality to an app that is very similar

  • 0

I am working on adding some functionality to an app that is very similar to the app switching drawer on Springboard on iOS. I want to be able to have a button that I can hit that will animate the y-coordinates of the view up so that another view is exposed at the bottom. Like I said, very similar to the home button double-tap feature on iOS.

After doing some looking around, it appears that I need to wrap both of the sub view controllers into one parent view controller.

How can I go about doing this? The existing view controller is pretty complicated so I am having a hard time figuring out where to start.

  • 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-06-17T02:35:24+00:00Added an answer on June 17, 2026 at 2:35 am

    I don’t know that you need to use a parent view controller to do this. This code worked for me to do what I think you want. I have one BOOL ivar to keep track of whether the bottom view has been revealed, and use the same button in the main view to toggle between the two states.

    -(IBAction)slideInController:(UIButton *) sender {
        if (viewRevealed == NO) {
            next = [self.storyboard instantiateViewControllerWithIdentifier:@"Blue"];
            next.view.frame = CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y + self.view.frame.size.height, self.view.frame.size.width, 100); // my NextController's view was made 100 points high in IB.
            [self.view.window addSubview:next.view];
            [UIView animateWithDuration:.6 animations:^{
                self.view.center = CGPointMake(self.view.center.x, self.view.center.y - 100);
                next.view.center = CGPointMake(next.view.center.x, next.view.center.y - 100);
            } completion:^(BOOL finished) {
                viewRevealed = YES;
            }];
        }else{
            [UIView animateWithDuration:.6 animations:^{
                self.view.center = CGPointMake(self.view.center.x, self.view.center.y + 100);
                next.view.center = CGPointMake(next.view.center.x, next.view.center.y + 100);
            } completion:^(BOOL finished) {
                [next.view removeFromSuperview];
                viewRevealed = NO;
            }];
        }
    }
    

    I usually do use container view controllers to do this kind of thing, but this works, and is very simple.

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

Sidebar

Related Questions

I have an app and there is some basic functionality that needs to be
I have to show some functionality similar to accordion that is of jquery so
I am working on adding In-App purchases to my app. I am able to
I have a video that is 60 seconds long. I am working on adding
I'm working on adding some functionality and fixing some bugs in this code I
We are working on adding some Facebook Connect functionality to our site. Part of
The application that I am working on is a Service Desk App. I have
I am working on a large application and am adding some drag/drop functionality to
I'm working on a travel site and am interested in adding some functionality so
I have some nice, working edit-undo functionality in my winforms application. It works using

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.