显示图像时处理 iPhone 方向变化的有效方法是什么
免责声明:我知道锁定方向的问题已经被提出并解决了。但这只是我问题的一半。
我正在为一家小型独立游戏开发商建立一个 iPhone 网站。他们希望能够展示一些 iPhone 游戏的屏幕截图。但这有点问题。所有的屏幕截图都是在横向模式下从游戏中截取的,因此横向显示它们确实没有任何意义。
目前我有一个非常轻量级的灯箱式图像显示。您单击网站上的按钮,图像就会弹出(通过 ajax 魔法!)占据整个屏幕。单击图像上的任意位置,图像就会消失,就好像您从未查看过它一样。
我认为两个最实用的解决方案是:a)在显示图像期间锁定 iPhone 方向;或者 b) 当手机旋转时,对图像进行一些非常偷偷摸摸的旋转,这样就不会有人注意到。其中任何一个可能/可行吗?如果是这样,你能给我一些建议吗?如果没有,有人解决过类似的问题吗?
我的个人服务器提供了此演示。
Disclaimer: I know the question of locking orientation has been asked, and solved. But that's only half my question.
I'm building an iphone website for a small indie game developer. They want to be able to show off screenshots from some of their iphone games. This is somewhat of a problem though. All the screenshots are taken from the game in landscape mode, so it really doesn't make any sense to display them in landscape.
Currently I have a very lightweight lightbox-style display for the image. You click a button on the site, and the image pops up (through ajax magic!) to occupy the full screen. Clicking anywhere on the image makes it go away, as if you had never viewed it.
I'm thinking that the two most practical solutions are either: a) lock iphone orientation for the duration of displaying the image; or b) do some very sneaky rotation on the image when the phone rotates, so no one ever notices. Are either of these possible/feasible? If so, could you give me any tips? And if not, has anyone solved a similar problem?
A demo of this is available at my personal server.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的 $.02
作为个人设计决策 - 我将有两个图像,并随着旋转从纵向变为横向而切换它们。锁定方向看起来很不友好。作为一些额外的视觉效果,您可能想在图像交换之间放置某种过渡图像。
这是可能有帮助的东西.. http://snippets.dzone.com/posts/show/4912
My $.02
As a personal design decision - I would have two images, and switch them as the rotation changes from portrait to landscape. Locking orientation seems so unfriendly. As some extra eye candy, You may want to put some sort of transition image in there between image swaps.
Here is something that may help .. http://snippets.dzone.com/posts/show/4912