我想让它看起来好像是重置按钮。
它会带我进入我的mainviewcontroller屏幕然后再回来。
MainViewController.m
MainViewController.h
MainViewController.xib
ViewController.xib
ViewController.m
ViewController.h
我不明白我该怎么做......
- (IBAction)newGame:(id)sender {
[self dismissModalViewControllerAnimated:YES];
ViewController *screen = [[ViewController alloc] inittWithNibName:@"ViewController" bundle:nil];
screen.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentModalViewController:screen animated:YES];
}
关于如何做到这一点的任何想法?
由于
答案 0 :(得分:0)
在没有动画的情况下执行此操作,如下所示。
- (IBAction)newGame:(id)sender {
[self dismissModalViewControllerAnimated:NO];
ViewController *screen = [[ViewController alloc] inittWithNibName:@"ViewController" bundle:nil];
screen.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentModalViewController:screen animated:NO];
}