Part of the uiview doesn't call touchesBegan for view on top of uisplitview
I'm writting an ipad app with a uisplitview. Once a 开发者_Go百科user taps on a button, I display another view in full screen by removing the uisplitview from the stack and pushing the new view. The problem I have is that the new uiview only gets touchesBegan for 3/4 of the screen. It seems like that is the same area used up for the uidetailview in the uisplitview. I've been trying to figure this out for a few days with no luck.
the uisplitview gets synthesized and it gets added in the didFinishLaunchingWithOptions like this:
[window addSubview:splitViewController.view];
[window makeKeyAndVisible];
then, when the user touches a button, I do this:
NewViewController *newViewController = [NewViewController alloc];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:newViewController];
navController.modalPresentationStyle = UIModalPresentationFullScreen; navController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self.navigationController presentModalViewController:navController animated:YES];
[newViewController release];
[navController release];
Check the sizes of the bounds of the view. It should be as big as the iPad screen. That is 1024x768 (or 768x1024).
Long time ago... but maybe somebody else needs the answer. I had the same problem. My fault was that I initialized the UIWindow with portrait mode (1024+768) but this is wrong. The window, however you rotate the iPad, will never rotate and must have the portrait dimensions (768x1024).
精彩评论