我将介绍一个调用简单模态视图控制器的方法。
[self performSegueWithIdentifier:@"SegueLogOut" sender:nil];
然而,当我关闭它时,我希望它向上移动而不是向下移动,这可能吗?
[self dismissViewControllerAnimated:YES completion:nil];
编辑:
我尝试创建一个自定义动画,但效果并不理想。背景仍然保持黑色,直到模态框关闭...
[UIView animateWithDuration:1 animations:^{
self.view.frame = CGRectMake(0, -self.view.frame.size.height, self.view.frame.size.width, self.view.frame.size.height);
} completion:^(BOOL finished) {
[self dismissViewControllerAnimated:NO completion:nil];
} ];