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

  • Home
  • SEARCH
  • 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 8865149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:25:54+00:00 2026-06-14T16:25:54+00:00

This is just a test project before I implement into something bigger:-) As per

  • 0

This is just a test project before I implement into something bigger:-)

As per the image I have created 2 custom views inside 1 ViewController. I have a need for them to overlap or at least move out of the way and back again Within the app.

I have tried looking up Custom Views, but i am having much luck.

I was hoping to use this code or something similar:

-(IBAction)move02Action
{
   [UIView beginAnimations:nil context:NULL];
   [UIView setAnimationDuration:0.5];
       _left.view.frame = CGRectMake(80, 70, 160, 380);  //_left is Left UIViewContorller
       _right.view.frame = CGRectMake(240, 70, 160, 380); //_right is Right UIViewContorller
   [UIView commitAnimations];
}

I realise that that is for UIViews rather than View Controllers. Any ideas on where to look?

Storyboard

Thanks for the insight:-)

  • 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-14T16:25:55+00:00Added an answer on June 14, 2026 at 4:25 pm

    You can use Containment view controller like this

     UIView *view = [[UIView alloc] initWithFrame:CGRectMake((80, 70, 160, 380))];
     [view setBackgroundColor:[UIColor whiteColor]];
    [self.view addSubview:view];
    
    LeftViewController *left = [[LeftViewController alloc] init];
    
    left.view.frame = view.bounds; 
    [left  setDelegate:self];
    [view addSubview:left .view];
    
    [left  didMoveToParentViewController:self];
    [self addChildViewController:left ];
    

    Check out the “Implementing a Container View Controller” documentation.

    EDIT

    1) Add a ScrollView to the self.view and add two views in the scroll view with different frames Use the above suggested code to add the views.

    2) set the content off set for scroll View when necessary like this

     CGPoint bottomOffset = CGPointMake(scrolposition, scrollView.contentSize.height - scrollnView.bounds.size.height);
        [scrollView setContentOffset:bottomOffset animated:NO];
    

    if you want the effect of over lapping views use [[self view] bringSubviewToFront:[self LeftView]]; and [[self view] sendSubviewToBack:LeftView];

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

Sidebar

Related Questions

I have this simple test project just to test the IncludeExceptionDetailInFaults behavior. public class
Lets say I have hierarchy like this (This is just a test program. Please
I have this test code that just saves an XML file to a folder.
I have just come across this code: function test(){ //... if ( $profilerule ==
I have a windows service in VS.net 2008. Just to test the application before
I have a project laid out this way: lib/ bar.js curl.js src/ foo.js test/
This is just an early stage test of creating and writing a file to
just trying to test for equality in this piece of code, but getting a
I just tried to run my test app and I got this error: 2012-06-16
This just saves time. Since I already have a web applciation. I can just

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.