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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:21:48+00:00 2026-06-05T03:21:48+00:00

I have an AppDelegate, which owns a window, and from there on, A main

  • 0

I have an AppDelegate, which owns a window, and from there on, A main view, from which when I go to the next view, I push the new view in order to use the same Navigation Controller and toolbar:

- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
{
    self.appview = [[AppointmentView alloc] initWithNibName:@"AppointmentView" bundle:[NSBundle mainBundle]];

    @synchronized(self.MahAppntmnts){                             // Set the view's appointment
        [appview setMyAppointment:[[MahAppntmnts MyAppointments] objectAtIndex:indexPath.section]];
    }
    [super addChildViewController:self.appview];
    AppDelegate *del = (AppDelegate *)[UIApplication sharedApplication].delegate;
    [UIView  beginAnimations:nil context:NULL];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
    [UIView setAnimationDuration:0.75];
    [del.navigationController pushViewController:self.appview animated:NO];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO];
    [UIView commitAnimations];
}

Now this works fine for switching views, but when I’m trying to go back, I get the same boring flip transition.
I tried setting on my AppView’s viewWillDissapear delegate method:

-(void) viewWillDisappear:(BOOL)animated 
{
    [UIView  beginAnimations:nil context:NULL];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
    [UIView setAnimationDuration:0.75];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO];
    [UIView commitAnimations];
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDelay:0.375];
    [self.navigationController popViewControllerAnimated:NO];
    [UIView commitAnimations];
    [super viewWillDisappear:animated];
}

This seems to work for when I go back to the previous view, but when I try to transition to new views (using the same method as before) they either not appear, or I flip by to the same view. So I’m guessing that this code should not be on viewWillDissapear, or that I am doing something wrong…

  • 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-05T03:21:49+00:00Added an answer on June 5, 2026 at 3:21 am

    Well I found the solution, problem was my miss-conception to “whom” the animation belonged to. I added the code found in viewWillDissapear (located in the pushed view), to the viewWillAppear delegate of the view that did the pushing in the first place (the code found in accessoryButtonTappedForRowWithIndexPath), so that the controlling view initiates the animation when pushing another view, and when another view navigates back to it, the reverse animation is displayed. Solved all problems and works like a charm.

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

Sidebar

Related Questions

I have an AppDelegate which has 3 views. I add all three [window addSubview:gameViewController.view];
Hello, I have this code in my AppDelegate : [window addSubview:viewController.view]; [window makeKeyAndVisible]; return
I have created two view controllers in which there is UIImage animations.Its crashing frequently
I have an activity view that I have added in AppDelegate class to tap
I have implemented this code in appDelegate in order to costumize navigation bar back
I have this in my view controller: [[[UIApplication sharedApplication] delegate] sendMessageAsSingleObject:[sender currentTitle]]; Which gives
Lets say that I have 4 view controllers (call them FirstView,SecondView,ThirdView,FourthView) which are created
i have a note which can share it to evernote,i done it sucessfully.but there
I have a UIProgress view which I want to update as an NSXML Parser
I have two UIViewControllers which I sometimes need to show at the same time.

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.