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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:00:14+00:00 2026-06-08T21:00:14+00:00

I have code: ListViewController * listViewController = [[ListViewController alloc] initWithNibName:@ListViewController bundle:nil]; [UIView beginAnimations:nil context:nil];

  • 0

I have code:

ListViewController * listViewController = [[ListViewController alloc] initWithNibName:@"ListViewController" bundle:nil];    

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.5];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];

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

self.view.hidden = YES;
listViewController.view.hidden = NO;


[self viewDidDisappear:YES];
[listViewController viewDidAppear:YES];
[UIView commitAnimations];    

But it does not works, and listViewController does not displayed( Please, somebody can tell me the solution of this problem?

  • 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-08T21:00:16+00:00Added an answer on June 8, 2026 at 9:00 pm

    Try something like:

    UIViewAnimationOptions ops = UIViewAnimationOptionTransitionFlipFromRight;
    NSArray *temp = [[NSBundle mainBundle] loadNibNamed:@"NameOfNib" owner:self options:nil];
    UIView* newView = [[temp objectAtIndex:0] view];
    [UIView transitionFromView:self.view toView:newView duration:1.5 options:ops completion:nil];
    self.view = newView; //Lets you control the new view from the current controller (you might want to save a reference to the old one if you need to change back)
    

    As meronix said, non-block based animation is discouraged by Apple for the newer iOS versions. The above method is the “approved” way to do it.

    Just so you know, the viewWillAppear, viewDidDisappear, and similar methods aren’t methods that YOU call to make the view do things. They’re called automatically when these things happen.

    Your code had a few misunderstandings; I’ve commented on them below

    //This looks fine (depending on what is in the nib)
    ListViewController * listViewController = [[ListViewController alloc] initWithNibName:@"ListViewController" bundle:nil]; 
    
    //Normally I use these to move things around, not change the view
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:1.5];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES];
    
    [self viewWillDisappear:YES]; //These two methods aren't things that you call
    [listViewController viewWillAppear:YES];
    
    self.view.hidden = YES; //If you're flipping or otherwise moving a view out of 
    listViewController.view.hidden = NO; //sight then you don't need to hide/unhide views
    
    [self viewDidDisappear:YES]; //Same as above, you don't call these
    [listViewController viewDidAppear:YES];
    [UIView commitAnimations]; 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have code in my app that adds a UIView to the root view
I have code structure like that: var adjective = context.Adjectives.Find(11); //works var substantive =
I have code that creates, adds and tags unbuttons in a uiview which is
I have code like: begin RunProgram:=TProcess.Create(nil); RunProgram.Commandline:='calc.exe'; RunProgram.Execute; RunProgram.Commandline:='notepad.exe'; RunProgram.Execute; RunProgram.Free; end. and I
I have code that generates a List<string[]> variable but can't quite figure out how
I have code like this in my view model: function ChatListViewModel(chats) { var self
I have code which has a drop down list. And when a certain option
I have code that looks more or less like the code below but it
I have code to create a live screenshot of the stage in my swf.
I have code similar to the following: <div class=container> <div class=overlay> // hover content

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.