Контроллер PageSurl анимации iOS не отображается - PullRequest
0 голосов
/ 07 февраля 2012

У меня есть ParentViewController, который находится в UIScrollView вместе с SiblingsViewControllers, как дерево ниже.

  • RootViewController
    • UIScrollView
      • HomeViewController
      • ParentViewController
        • FormNotesViewController - Модальное представление для представления с использованием PageCurl
      • FooViewController
      • BarViewController

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? Может быть, я что-то пропустил? Любой совет отладить это?

1 Ответ

0 голосов
/ 07 мая 2012

вариант 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];
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...