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
-使用PageCurl显示的模式视图FormNotesViewController
FooViewController
BarViewController
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
与我面临的问题有关。我使用了不同的结构来代替视图组织。我很抱歉,我无法尝试你提供的解决方案,因为我不再参与该项目。不过还是谢谢你。