我正在动态地删除一个视图并添加一个拆分视图控制器。我在景观模式下遇到了问题。当我在横向模式下执行相同的加载时,视图首先在纵向模式下加载,然后转向横向模式。有没有办法解决这个问题。有一个暂时的闪烁和用户体验是不令人满意的。
发布于 2010-12-21 07:05:57
今天早些时候我遇到了一个类似的问题,我删除了之前添加到UIWindow中的视图,然后添加了解决问题的另一个ViewController,如下所示;
-(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;
}];希望这能有所帮助!
https://stackoverflow.com/questions/4342018
复制相似问题