【发布时间】:2012-02-07 07:51:11
【问题描述】:
我有一个ParentViewController,它和它的SiblingsViewControllers 一起在UIScrollView 中,就像下面的树一样。
-
RootViewController-
UIScrollViewHomeViewController-
ParentViewController-
FormNotesViewController- 使用 PageCurl 呈现的模式视图
-
FooViewControllerBarViewController
-
ModalViewController 由 ParentViewController 在 IBAction 时提供,具有以下功能。
- (IBAction)onNoteOpen:(id)sender {
FormNotesViewController *notesView = [[FormNotesViewController alloc] initWithNibName:@"FormNotesViewController" bundle:nil];
//OPTION #1
notesView.modalTransitionStyle = UIModalTransitionStylePartialCurl;
notesView.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentModalViewController:notesView animated:YES];
//OPTION #2
// [UIView beginAnimations:@"PartialPageCurlEffect" context:nil];
// [UIView setAnimationDuration:1.0];
// [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
// [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp
// forView:notesView.view cache:NO];
// [self.view addSubview:notesView.view];
// [UIView commitAnimations];
}
我已经尝试了选项#1 和#2。尽管它们都显示了notesView,但应用程序无法显示转换。
我不知道为什么。
会不会是因为UIScrollView?难道是我错过了什么?有什么建议可以调试吗?
【问题讨论】:
-
您检查过 FormNotesViewControllers 视图上的 frame 属性吗?也许你必须等到在你的笔记控制器中调用 viewDidLoad。
标签: ios ios5 modalviewcontroller presentmodalviewcontroller