如何使 Web URL 在从应用程序打开时不显示动画?
我使用以下代码在应用程序中单击按钮时打开 URL:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.innotrack.eu///"]];
但是当它在 safari 上打开 URL 时,它会产生动画,要求是阻止此动画。如何实现?
I'm using following code to open URL on a button click from application:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.innotrack.eu///"]];
But when it opens the URL on safari, it animates, Requirement is to prevent this animation. How to achieve it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
像轮播中的窗口交换一样动画?这是 iOS4 中切换应用程序时的本机行为,我认为您无法避免这种情况。
您可以做的是创建一个应用内 UIWebView 并使用它来显示网站。这样您就可以控制在视图之间切换时发生的动画。
Animate like window exchange in carousel? That is native behavior when switching applications in iOS4 and I don't think you can avoid that.
What you can do is create an inapp UIWebView and use it to display website. That way you have control over animations that happen when switching between views.
我们只有权命令 UIApplication 到
openURL:
,而且我们似乎无权命令它在打开 URL 时不显示动画。We have only the right to command UIApplication to
openURL:
and, it seems, we are not authorized to order it not to animate while opening the URL.