Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/99.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iOS模态视图控制器PageCurl动画未显示_Ios_Ios5_Modalviewcontroller_Presentmodalviewcontroller - Fatal编程技术网

iOS模态视图控制器PageCurl动画未显示

iOS模态视图控制器PageCurl动画未显示,ios,ios5,modalviewcontroller,presentmodalviewcontroller,Ios,Ios5,Modalviewcontroller,Presentmodalviewcontroller,我有一个ParentViewController,它位于UIScrollView及其siblingsviewcontroller中,如下面的树所示 RootViewController UIScrollView HomeViewController ParentViewController FormNotesViewController-使用PageCurl显示的模式视图 FooViewController BarViewController ModalViewControlle

我有一个
ParentViewController
,它位于
UIScrollView
及其
siblingsviewcontroller
中,如下面的树所示

  • RootViewController
    • UIScrollView
      • HomeViewController
      • ParentViewController
        • FormNotesViewController
          -使用PageCurl显示的模式视图
      • FooViewController
      • BarViewController
ModalViewController由
ParentViewController
在iAction上以下面的函数显示

- (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。虽然它们都显示了
注释视图
,但应用程序无法显示转换

我想不出确切的原因

可能是因为
UIScrollView
?是不是我错过了什么?有什么调试建议吗?

选项1:

FormNotesViewController *notesView = [[FormNotesViewController alloc] initWithNibName:@"FormNotesViewController" bundle:nil];

notesView.modalTransitionStyle = UIModalTransitionStylePartialCurl;

[self presentModalViewController:notesView animated:YES];
备选案文2:

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:notesView.view cache:YES];
[self.view addSubview:notesView.view];
[UIView commitAnimations];

是否已检查FormNotesViewController视图上的frame属性?也许你必须等到在你的notes控制器中调用viewDidLoad,我必须使用不同的视图结构来解决这个问题。显然,在
UIScrollView
中有很多视图,并且从
UIScrollView
的子视图之一调用
FormNotesViewController
与我面临的问题有关。我使用了不同的结构来代替视图组织。我很抱歉,我无法尝试你提供的解决方案,因为我不再参与该项目。不过还是谢谢你。