在 iPhone 应用程序中的子视图之间切换
因此,在我正在开发的 iPhone 应用程序中,我决定向用户显示所有内容的最佳方式是让屏幕的顶部显示一些信息,而屏幕的底部显示不同的信息。然而,底部有时会发生变化,所以我正在努力实现它。
另一个执行此操作的应用程序是 MTGLife 应用程序,以下是一些图片:
http:// /picasaweb.google.com/lh/photo/HILMaJPnbLxP6hQRkn_6XA?feat=directlink http://picasaweb.google.com/lh/photo/d5wpS8x_aRyAEOBpYYIxwQ?feat=直接链接 http://picasaweb.google.com/lh/photo/ RW-BQfqx-VytRim3BxeRZQ?feat=directlink
您会看到,点击按钮后,选择器会切换并显示日志。点击同一个按钮会将它们切换回来,并带有漂亮的动画。我想在我的应用程序中做同样的事情。但我不确定最好的方法......
我想我会制作 2 个 UIView,然后简单地在它们之间翻转,但我想首先获得一些关于如何做到这一点的意见,然后朝着正确的方向推动。
谢谢你!
So, in an iPhone app I am working on, I've decided that the best way to display all the contents to the user is to have the top part of the screen show some information, and the bottom of the screen show different information. However, the bottom part will change sometimes, so I was working on implementing that.
Another app that does this is the MTGLife app, here are some pictures:
http://picasaweb.google.com/lh/photo/HILMaJPnbLxP6hQRkn_6XA?feat=directlink
http://picasaweb.google.com/lh/photo/d5wpS8x_aRyAEOBpYYIxwQ?feat=directlink
http://picasaweb.google.com/lh/photo/RW-BQfqx-VytRim3BxeRZQ?feat=directlink
You see that upon hitting a button, the picker switches over and displays the log. Hitting the same button switches them back, with a pretty animation. I would like to do the same thing in my application. I'm not sure the best way to go about it though...
I was thinking that I would make 2 UIViews, and then would simply flip between them, but I want to get some opinions first on how to do this, and then a push in the right direction.
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
2 个 UIView 是一个很好的方法。通过使用
UIView
动画功能,您可以使用所需的过渡在 Log 和 Picker 之间切换。在 UICatalog 示例应用程序中(请参阅
TransitionViewController
),有一个关于如何为两个子视图设置动画的示例The 2 UIViews is a good approach. By using the
UIView
animations functions, you can switch between the Log and the Picker with the desired transition.In the UICatalog sample application (see
TransitionViewController
), there an example on how to animation two subviews