Mangled View Frame with Split View Controller

In my application, which has a controller with a shared image, I have a loading view. My Root View Controller is a subclass of UITableViewController ; when loading data, I save self.view and proceed with viewing the download:

 - (void)loadingWillBegin { self.cachedView = self.view; self.progressBar.progress = 0.0; [UIView transitionFromView:self.view toView:self.loadingView duration:1.0 options: UIViewAnimationOptionTransitionCurlDown completion:NULL]; self.view = self.loadingView; } - (void)loadingDidFinish { [UIView transitionFromView:self.loadingView toView:self.cachedView duration:1.0 options:UIViewAnimationOptionTransitionCurlUp completion:NULL]; self.view = cachedView; } 

The transitions work fine, but after the boot view is unloaded, the frame of the table view is all screwed on. This is a black bar in the same size as the status bar (I have cleared the syntax of the status bar) and the view will be below the actual bottom of the screen. The frame seems the same as loadingView ; from this point of view, I set the iPad Simulated Metrics to Master , which resulted in a performance of about 820px. Regardless of this option, Xcode 4 does not allow me to change the view frame in the size inspector.

What should I do with the presentation frame?

+4
source share
1 answer

Upon completion of the animation, you can manually set the correct frame.

 [UIView transitionFromView:self.loadingView toView:self.cachedView duration:1.0 options:UIViewAnimationOptionTransitionCurlUp completion:^(BOOL finished){self.cachedView.frame = /* Insert appropriate frame here. */;}]; 
+2
source

All Articles