1

I'm writting an ipad app with a uisplitview. Once a 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];

eduardo
  • 41
  • 3

2 Answers2

0

Check the sizes of the bounds of the view. It should be as big as the iPad screen. That is 1024x768 (or 768x1024).

Daniel
  • 20,420
  • 10
  • 92
  • 149
  • I will check that once I get to my computer. Thanks – eduardo Sep 15 '10 at 16:01
  • The view was 748 X 1024, but after I increased the size I still don't get touches. – eduardo Sep 16 '10 at 16:54
  • Even if the size was 748 X 1024, I only get touches for 3/4 of the screen. The simulator is in portrait mode and from the top to 3/4, I get touches, for the last 1/4 of the screen, the touchesBegan doesn't get called at all. – eduardo Sep 16 '10 at 17:11
  • Could you post some code about where the uisplitview is generated and how it is switched with the new view? – Daniel Sep 17 '10 at 10:01
0

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).

goosefx
  • 51
  • 4