使用 Pushviewcontroller 自下而上的动画?
我是 iPhone SDK 新手。我正在使用以下代码,但当我单击此按钮时动画从右到左发生。我想从下到上做。
- (IBAction)clickedsButton:(id)sender
{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationDuration:0.75];
[self.navigationController pushViewController:settingsController animated:TRUE];
[UIView commitAnimations];
}
setAnimationTransition
仅支持两种:
- UIViewAnimationTransitionFlipFromLeft
- UIViewAnimationTransitionFlipFromRight
我使用了以下内容,但它不起作用:
settingsController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self.navigationController pushViewController:settingsController animated:YES];
I am new to iPhone SDK. I am using the following code but the animation happens from right to left when I click this button. I want to do from bottom to top.
- (IBAction)clickedsButton:(id)sender
{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
[UIView setAnimationDuration:0.75];
[self.navigationController pushViewController:settingsController animated:TRUE];
[UIView commitAnimations];
}
setAnimationTransition
supports only two:
- UIViewAnimationTransitionFlipFromLeft
- UIViewAnimationTransitionFlipFromRight
I used following, but it is not working:
settingsController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self.navigationController pushViewController:settingsController animated:YES];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您正在寻找的是
What you're looking for is
SWIFT 3
SWIFT 3