iPhone 应用程序上的 webOS 风格视图切换
我一直在使用一个 iPhone 应用程序,我希望它能像 Palm Pre 那样切换视图来进行多任务处理。我知道通过使用应用程序底部的黑条来切换视图的常用方法,但我正在开发的应用程序不适合在方式中使用大黑条(请参见附图#1)。
我想我的问题是,如何缩小当前视图(当前位置窗口)并在侧面显示其他视图? (参见附图#2)然后可以左右滑动以查看其他视图。我不知道该怎么做,如果有人能帮助我解决这个问题,我将永远感激不已。
http://www. Threepixeldrift.com/images/deep-storage/webOScardapp1。 jpg http://www. Threepixeldrift.com/images/deep-storage/webOScardapp2。 jpg
I have been working with a iPhone app that I would like to have switch views like the Palm Pre does for multitasking. I know the usual way of switching views by using the black bar at the bottom of the app but the app I am working on does not lend itself to having a big black bar in the way (see attached picture #1).
I guess my question is, how do I shrink the current view (Current Location window) and show other views on the sides? (see attached picture #2) Then be able to swipe left and right to view other views. I have no idea how to do this and would be eternally grateful if someone could help me out with this.
http://www.threepixeldrift.com/images/deep-storage/webOScardapp1.jpg
http://www.threepixeldrift.com/images/deep-storage/webOScardapp2.jpg
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该架构应该类似于 NavigationController 的架构:您有许多 ViewController,每个 ViewController 负责应用程序中的一张卡片。然后你就有了一个“超级控制器”来控制这些 ViewController,在必要时通过在超级视图中添加和删除它们的受控视图。
您需要使用 CoreAnimation 并自己编写动画。
The architecture should be similar to that of NavigationController: you have a number of ViewControllers each responsible for one card in your app. Then you have a 'super-controller' which controls these ViewControllers, by adding and removing their controlled views from the superview when necessary.
You'll need to use CoreAnimation and write the animations yourself.
我将使用 UIScrollView,每张卡都可以是通过设置 contentoff 集显示的小视图。
i would use a UIScrollView and each card can be a small view that is shown by setting the contentoff set.