我有一个按钮,按下时会推动视图控制器,但是我使用的是自定义动画,因此pushViewController: childController animated:
设置为 NO。我想做的是在我的- (void)viewWillAppear:(BOOL)animated
方法中检测这个自定义动画并写一个这样的 if 语句;
- (void)viewWillAppear:(BOOL)animated {
if (customAnimation occured) {//Do this}
else {//Do this}
}
这是我的按钮推动视图控制器的方法。
- (void)nextPressed:(id)sender {
childController = [[CategoryOneDetailController alloc] initWithNibName:xibDownName bundle:nil];
[UIView beginAnimations: @"Showinfo"context: nil];
[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.75];
[self.navigationController pushViewController: childController animated:NO];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.navigationController.view cache:NO];
[UIView commitAnimations];
[childController release];
}
任何帮助将不胜感激,谢谢,萨米。