旋转时从表格视图切换到 ui 滚动视图
我有一个具有表格视图的应用程序,当设备进入横向时,我希望它切换到一个 uiscroll 视图,其中有大量我可以在之间滚动的图像。有点像 iPod 应用程序,您可以将所有歌曲放在表格视图中,当您旋转时,您可以滚动浏览专辑封面。
我尝试了一些有关更改视图的教程,但它们似乎不起作用。
谁能给我任何指示吗?
谢谢!
I have an application that has a table view, when the device goes to landscape i want it to switch to a uiscroll view that has heaps of images i can scroll between. Kinda like the ipod app how you have all your songs in a table view and when u rotate you get album art work that you can scroll through.
I tried some tutorials on changing views but they didn't seem to work.
Can anyone give me any pointers?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题解决了。
对于那些感兴趣的人,我所做的是仅支持表格视图中的纵向方向,然后在设备方向发生变化时有一个侦听器。当方向改变时,我将模态视图推到表格视图的顶部。
模态视图仅支持横向方向。再次监听设备方向的变化,当发生这种情况时,只需关闭模态视图即可。
希望这可以帮助那些我为此感到非常头疼的人。
Problem solved.
For those who are interested, what i did was to only support portrait orientation in the table view, then have a listener for when the device orientation has changed. When the orientation changes, i push a modal view on top of the table view.
The modal view only supports the landscape orientations. Once again listen for a device orientation change, and when that happens, just dismiss the modal view.
Hope this helps someone I had a big headache over it.