0

I am dynamically removing a view and adding a splitviewcontroller. I have problems in landscape mode. When I do the same loading in landscape mode the view is first loaded in portrait and then it is turning to landscape mode. Is there a way to solve this problem. There is a temporary flickering and UX is not pleasing.

thndrkiss
  • 4,515
  • 8
  • 57
  • 96
  • By your wording, it sounds like you are not using a split view controller as the root view controller. Is that correct? If so, that is probably part of your problem. – Shaggy Frog Dec 03 '10 at 03:46
  • Ya. But I don't have anything to show during my initial stages in the left side. So i have a different view temporarily and then load the splitview once the content is ready. – thndrkiss Dec 03 '10 at 05:57

1 Answers1

1

I ran into a similar problem earlier today, I removed the previous views I had added to the UIWindow, then added my other ViewController which resolved the issue, like so;

-(void)loginWasSuccessful {

    // discard the login view controller, and nil it out
    [self.loginViewController_iPad.view removeFromSuperview];
    self.loginViewController_iPad = nil;

    self.splitViewController.view.hidden = NO;
    self.splitViewController.view.alpha = NO_ALPHA;

    // create an animation block that'll fade out the splash view, and fade in the split view controller (that houses employee search)
    [UIView animateWithDuration:LOGIN_TO_EMP_SEARCH_FADE_ANIMATION_DURATION animations:^{   

        // remove and nil the splash and login view from the window...
        self.splashView.alpha = NO_ALPHA;
        self.splitViewController.view.alpha = FULL_ALPHA;

    }];

Hope this helps!

Cole
  • 676
  • 8
  • 24