iphone - Incorrect frame size/orientation after switching from UINavigationController to a UISplitViewController -
I am trying to use a UISplitViewController for only one tab in my application (other navigation controllers and different ViewControllers are using)
I've added SplitViewController to MainWindow.xib (the only way I could work it out), but I did not add it to the window when FinishLaunchingWithOptions it is commonly called the case, so the SplitViewController hides lives.
When I click on the tab, I place some code in the Representative window to hide the Navigation Controller and put the Split Visual Controller along with it:
[Window addSubview: SplitViewController.view];
If the iPad is in landscape mode, SplitViewController still thinks it is in portrait mode for some reason and frame for root and extension view controller is wrong if I start rotating the iPad. Everything works well. This is just the initial call that is wrong.
It seems that SplitViewController has not been notified about the initial landscape rotation because it is hidden.
During the first call, for the frame 320 x 980 root controller, if the iPad has been rotated on the portrait and then the frame reset back in landscape mode becomes 320 x 724.
The problem of the wrong size is that it does not display the last item in the table view in the root controller.
I have tried to change the frame size in view controller's ViewDidLoad and ViewWillAppear but it does not change anything.
Any help would be greatly appreciated.
Weird, inside my view, to fix the size of ViewController, Done
self.view.frame = CGRectMake (321, 0, 703, 69 9);
I have a similar exact configuration: With a split VIPU controller and several view controllers as the root controller in the form of a tab Bark controller.
Comments
Post a Comment