我有一组 UIButtons 的视图。当按下一个按钮时,我希望其余的从屏幕上移开,然后将视图控制器更改为新视图。我的两种方法是:
-(IBAction)button1 {
[UIView beginAnimations: nil context: nil];
[UIVeiw setAnimationDuration:0.5];
[UIView setAnimationCurve:UIVewAnimationCurveEaseIn];
button2.transform = CGAffineTransforMakeTranslation(0, 520);
[UIView commitAnimations];
[self performSelector:@selector(switchtoview2) withObject:self afterdelay:0.6];
}
-(void)switchtoview2 {
View2ViewController *view2 = [[View2ViewController alloc] initWithNibName:nil bundle: nil];
view2.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:view2 animated:YES];
}
但是当我按下第一个按钮时,它只是中断而没有在调试器中留下任何东西。我该如何解决这个问题,或者至少检测出哪里出了问题?