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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:10:45+00:00 2026-05-25T01:10:45+00:00

I am calling turnView method who must get dissapear menuView (current) and may display

  • 0

I am calling turnView method who must get dissapear menuView (current) and may display adjustView. When method is called, it is executed with no errors but it does not switch views, menuView keeps and it returns to following line of method call. How to solve it? Thanks

call from menuView:

    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{    
    aboutTabController * myObject = [[aboutTabController alloc] init];

    if (indexPath.section == 1) {

        switch (indexPath.row) {
            case 0:
                [myObject turnView];
                break;
            case 1:
                //
                break;
            default:
            break;}
    }

}

method implemented on controller, menuController was defined for menuView class:

- (void) turnView

{
    [UIView beginAnimations:@"View Flip" context:nil];
    [UIView setAnimationDuration:1.0];
    [UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];

    if (self.adjustController == nil)
    {
        adjustView *aController = [[adjustView alloc] initWithNibName:@"adjustView" bundle:nil];
        self.adjustController = aController;
        [aController release];
    }

    [UIView setAnimationTransition: UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES];

    [self.menuController viewWillDisappear:YES];
    [self.adjustController viewWillAppear:YES];

    [self.menuController.view removeFromSuperview];
    [self.view insertSubview:adjustController.view  atIndex:0];

    [self.menuController viewDidDisappear:YES];
    [self.adjustController viewDidAppear:YES];

    [UIView commitAnimations];
}
  • 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-25T01:10:46+00:00Added an answer on May 25, 2026 at 1:10 am

    There are some major conceptual problems in your code, let me try to address them one by one:

    Logic in didSelectRowAtIndexPath:

    You are creating a new view controller no matter which row is being selected. You should only create it when you need it. Also you if and switch statements are very convoluted and difficult to read.

    Calling delegate methods

    The methods viewWillAppear: viewDidDisappear: etc. are there for you to catch these events, not to call them yourself. This might make sense in some cases, but they will have absolutely no effect in your animation block.

    Animation with blocks, or using built-in animations

    You should do your animation with the new block syntax. However, for just flipping to the next view, you can use an official API from Apple without having to program your own animation.

    Thus,

    -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
        if (indexPath.section==1 && indexPath.row==0) {
            adjustView *aController = [[adjustView alloc] initWithNibName:@"adjustView" bundle:nil];
            aController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
            [self presentModalViewController:aController animated:YES];
            [aController release];
        }
    }
    

    You can get rid of the controller by calling [self dismissModalViewControllerAnimated:YES] and the animation will automatically be in the other direction.

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

Sidebar

Related Questions

Calling the ajax called URL works well without ajax eg. http://localhost/ci/controller/method/param_value . But using
When calling the Parse method in the Razor ViewEngine, compilation errors are thrown as
When calling php via cli, the current directory is NOT changed to the one
Calling setFocus(null) on the ItemizedOverlay does not 'unfocus' current marker. According to the documentation:
Calling Thread.join blocks the current (main) thread. However not calling join results in all
Calling index.php?pConta=1&pDataInicial=01-01-2000&pDataFinal=31-12-2000 I get this notices: [08-Oct-2009 17:30:35] PHP Notice: Undefined index: pConta in
When calling rdma_disconnect(), do I get completion queue events for all posted recv work
After calling fork , the current process will call exit(0) . But the child
Calling this method: public static @Nonnull <TV, TG extends TV> Maybe<TV> something(final @Nonnull TG
Calling system() to run an external .exe and checking error code upon errors: #include

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.