iPad uisplitviewcontroller left view become balck
In one of my ipad开发者_Go百科 project, uisplitviewcontroller left view becomes black. But when I rotate iPad the orientation is portrait, left window display over the left winodw Is there anyone met the same problem?
I believe the problem is with your geometry. Check the frame that you set to your left viewControllers view.
Hope this'll help
I faced the issue as well. This happened to me only when I was not dismissing the UIPopOver in the Potrait mode before rotating it to Landscape mode.
So I dismissed the PopOver within the method:
- (void)splitViewController: (UISplitViewController*)svc willShowViewController:(UIViewController *)aViewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem {
if(defaultview)
defaultview.navigationItem.leftBarButtonItem=nil;
if (pc) {
[self dismissPopup];
}
}
And added the method in my DetailedViewController (the same view controller which had the above UIPopOverDControllerDelegate method)
-(void) dismissPopup{
if(pc)
{
[pc dismissPopoverAnimated:YES];
[pc release];
pc = nil;
isPopOverClosed = YES;
}
}
Thus by dismissing and releasing the object 'pc', when I rotate, the blackening of the left view goes away.
So far so good. But I face a problem after the above step:
The left view of the SplitView slightly displaced downwards.
This happens only when I rotate the iPad simulator from Potrait to Landscape when theUIPopOver is already open.
If I manually close it in Potrait mode by clicking outside the PopOver or clicking the PopOver
BarButtonItem on the left of the
toolbar, and then rotate the screen
to landscape, I do not face this
issue.The left view of the
SplitViewController is perfectly positioned.Any clue why this may be happening?
精彩评论