开发者

UINavigationController flashes white when I add it to a superview

开发者 https://www.devze.com 2022-12-26 01:19 出处:网络
I\'m adding a NavigationController as a subview of my main view, with the flip animation (like a utility app/flipview thing).

I'm adding a NavigationController as a subview of my main view, with the flip animation (like a utility app/flipview thing).

Here's how I'm doing it:

[UIView beginAnimations:nil context:NULL];
 [UIView setAnimationDuration:.7];
 [UIView setAnimationTransition:([self.tableController.view superview] ? UIViewAnimationTransitionFlipFromLeft : UIViewAnimationTransitionFlipFromRight) forView:self.tableHostView cache:YES];



  [self.tableController.view removeFromSuperview];

  settingsView* backView1 = [[settingsView alloc] initWithNibName:@"settingsView" bundle:nil];
  backView1.delegate = self;
  UINavigationController* settingsNavStack = [[UINavigationController alloc]initWithRootViewController:backView1];
  [backView1 release];

  settingsNavStack.view.frame = CGRectMake(0, 0, 320, 460);
  settingsNavStack.navigationItem.title = @"Settings";

  [self setBackView:settingsNavStack];

  [settingsNavStack release];

  [self.tableHostView addSubview:self.backView.view];
  [[self backView]setDelegate: self];

When it loads, the view comes in very nicely. However, the navigation bar stays white until like .开发者_运维百科2 secs after the animation finishes.

Anyone know why the navigation bar wouldn't display right away?


Turned chacheing off, made it look a little better. But it still has the issue...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号