Skip to content

UINavigation controller with VCTransitionLibrary pop shows black screen when pushed without animation #30

@dulgan

Description

@dulgan

Hi,

I followed your tutorials and use your VCTransitionLibrary in my app, here is my App structure :

  1. A NavigationController is the root of the application (using your tutorial code)
  2. MyRootViewController is the root view controller in the NavigationController
  3. MyPushedViewController is pushed or poped with animations by MyRootViewController

Everything is fine with animations, but a problem occur in the following configuration :

  1. MyRootViewController is on screen, (the only ViewController in the NavigationController stack)
  2. App goes to background
  3. App goes to foreground :
    3.1) applicationWillEnterForeground fires a notification to NSNotificationCenter defaultCenter
    3.2) MyRootViewController listen to this notification and execute the following code :
    // pop to root
    [self.navigationController popToRootViewControllerAnimated:NO];
    // instantiate new view controller
    MyPushedViewController *mpvc = [self.storyboard instantiateViewControllerWithIdentifier:@"MyPushedViewController"];
    // mpvc init code...
    // ...
    // push the new view controller
    [self.navigationController pushViewController:ncvc animated:NO];
  4. MyPushedViewController is displayed without any problem
  5. User swipe to trigger a pop, and MyRootViewController is black, not appearing in animation (but it's viewWillAppear is triggered).

I need to use animated:NO because I don't want the app to show anything else than MyPushedViewController when it's back to foreground.
The is no problem in any other configuration :
animated:YES display the animation fine
when MyPushedViewController was on screen, it's also working fine

Do you have any clue about this problem ?

Thanks for your work and your time !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions