我想应用带有动画的视图过渡
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
CGFloat xpos = responseView.frame.origin.x;
CGFloat ypos = responseView.frame.origin.y;
[UIView transitionWithView:responseView duration:1 options:UIModalTransitionStyleCrossDissolve animations:^{ responseView.frame = CGRectMake(xpos,ypos,720,700);
[responseView.superview bringSubviewToFront:responseView];
[responseView.superview addSubview:responseView];
}
completion: ^(BOOL finished) {NSLog(@"DONE");}];
}
我想应用带有动画的视图转换。我尝试了下面的代码。代码工作正常,现在我需要以有吸引力的方式更改动画的类型。请给我一个建议
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
CGFloat xpos = responseView.frame.origin.x;
CGFloat ypos = responseView.frame.origin.y;
[UIView transitionWithView:responseView duration:1 options:UIModalTransitionStyleCrossDissolve animations:^{ responseView.frame = CGRectMake(xpos,ypos,720,700);
[responseView.superview bringSubviewToFront:responseView];
[responseView.superview addSubview:responseView];
}
completion: ^(BOOL finished) {NSLog(@"DONE");}];
}
I want to apply a view transition with animation.I tried the code below.The code is working fine ,Now I need to change the type of the animation in a attractive manner.Please give me a suggestion
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
UIModalTransitionStyleCrossDissolve
不是一个有效的动画选项(尽管它可能仍然有效,因为枚举毕竟只是整数)。对于过渡样式,您有以下选择:
您必须自己决定哪种看起来最好。
UIModalTransitionStyleCrossDissolve
is not a valid animation option (though it may still work because enums are just integers after all).For the transition style, you have the following options:
You'll have to decide for yourself which looks best.