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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:18:33+00:00 2026-05-25T03:18:33+00:00

I have a UIView that contains a subview called menuView managed by a MenuViewController.

  • 0

I have a UIView that contains a subview called menuView managed by a MenuViewController.

I wrote that code :

- (void) viewDidLoad
{
    [self.menuView setFrame:CGRectOffset(self.menuView.frame, 0.0, self.menuView.frame.size.height)];
    [super viewDidLoad];
}

- (void) viewDidAppear:(BOOL)animated
{
    [UIView beginAnimations:@"SomeAnimation" context:nil];
    [UIView setAnimationDuration:2.0];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationTransition:UIViewAnimationTransitionNone forView:self.menuView cache:YES];           
    [self.menuView setFrame:CGRectOffset(self.menuView.frame, 0.0, -self.menuView.frame.size.height)];

    [UIView commitAnimations];

    [super viewDidAppear:animated];   // tried at begining too
}

But when loaded, no animation is visible… I also tried with viewWillAppear with no change.

it is called outside MenuViewController with :

- (IBAction) showMenu
{
    MenuViewController* menuController = [[MenuViewController alloc] initWithNibName:@"Menu" bundle:nil];];
    [self.view addSubview:menuController.view];
//    [menuController release];   for try
}

What’s the problem ?

P.S. : What I want to do is when the view is displayed, some part of that view (the menuView) move. That view (partially transparent) is intended to cover a superview that is owned by another ViewController.

  • 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-25T03:18:34+00:00Added an answer on May 25, 2026 at 3:18 am

    Are you calling the viewDidAppear method from your view controller? Some controllers, such as the UINavigationController, will take care of that, but if you’re using a custom controller, you’ll need to call it. Typically, you would call viewWillAppear, then add the view, the call viewDidAppear.

    So your code block would be:

    - (IBAction) showMenu
    {
        MenuViewController* menuController = [[MenuViewController alloc] initWithNibName:@"Menu" bundle:nil];];
        [menuController viewWillAppear:YES];
        [self.view addSubview:menuController.view];
        [menuController viewDidlAppear:YES];
        [menuController release];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UIView that contains a number of CALayer subclasses. I am using
I have a UIView that contains a UIScrollView and I want to be able
I have a NIB with a UIView that contains some UILabels, UIButtons etc. and
I have a NIB that contains a UIView. I have another NIB that contains
I have a UIView subclass that draws itself when -drawRect: is called. It only
I have an array (called array in the code below) which contains a number
I have a UIView called activityView , which contains two subviews activityIndicator and cancelOperationsButton
I have a UIView that contains a couple UIButtons that I am animating from
I have an app with a standard UIView that contains a toolbar. I am
I have a UIView that contains a row of subclasses of UIView . The

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.