0

我必须改变看法。在视图中,我有一个带有此代码的按钮:

    FormazioneViewController *formazioneC = [[FormazioneViewController alloc] initWithNibName:@"FormazioneView" bundle:nil];

self.formazioneViewController= formazioneC;

[UIView beginAnimations:@"View Flip" context:nil];
[UIView setAnimationDuration:1.25];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(animationDidStop)];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];

[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES];

[self viewWillDisappear:YES];
[self viewDidDisappear:YES];
[self.view addSubview:formazioneViewController.view];
[formazioneViewController viewWillAppear:YES];
[formazioneViewController viewDidAppear:YES];

[UIView commitAnimations];

我添加了一个超级视图,现在我必须在这个视图中返回,我使用一个带有这个代码的按钮:

    [UIView beginAnimations:@"View Flip" context:nil];
[UIView setAnimationDuration:1.25];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(animationDidStop)];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES];

[self viewWillDisappear:YES];
[self viewDidDisappear:YES];

[self.view removeFromSuperview];

[****** viewWillAppear:YES];
[****** viewDidAppear:YES];

[UIView commitAnimations];

我必须调用 viewWillAppear 和 ViewDidAppear 方法的对象是什么?谢谢

对不起,我的英语不好!

4

1 回答 1

0

你写过这个方法吗,

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
{
    return YES;
}
于 2012-06-13T08:59:26.580 回答