There is some viewController (In code "controller") that works fine.
ViewController has a view witch size can be change in runtime so I need use scrollView to display it all properly.
I add a view to the scrollView (in special created class) and it works just fine in portrait mode: I can change content of added view and see how it scrolls.
But in landscape mode there is unknown problem: I can see the view but it like a background - can see but can't touch it.
I do not rotate, I create views exactly in portrait or landscape mode. I create views same way both time.
ScrollForModalView* scrollController = [[Scroll开发者_如何学运维ForModalView alloc] init];
[[NSBundle mainBundle] loadNibNamed:@"ScrollForModalView" owner:scrollController
options:nil];
scrollController.scrollView.contentSize =
CGSizeMake(controller.view.frame.size.width, controller.view.frame.size.height);
[scrollController.scrollView addSubview:controller.view];
UINavigationController *navController = [[UINavigationController alloc]
initWithRootViewController:scrollController];
navController.modalPresentationStyle = UIModalPresentationPageSheet;
[self presentModalViewController:navController animated:YES];
[navController release];
[scrollController release];
Haven't any clue what to do.
Thanks a lot!
I don't know what was the problem, but it disappear when I set in InterfaceBuilder -> simulated User Interface Elements -> Orientation to Landscape for the view containing scrollView.
精彩评论