我的ParentViewController
与UIScrollView
及SiblingsViewControllers
一样,位于RootViewController
。
UIScrollView
HomeViewController
ParentViewController
FormNotesViewController
FooViewController
- 使用PageCurl呈现的模态视图 BarViewController
ParentViewController
ModalViewController由- (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];
}
在IBAction上呈现,其功能如下。
notesView
我尝试了#1和#2选项。虽然它们都显示UIScrollView
,但应用程序无法显示转换。
我无法弄明白为什么。
可能是因为{{1}}吗?可能是我错过了什么吗?有什么建议可以调试吗?
答案 0 :(得分:0)
选项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];