简体   繁体   English

管理iPhone IMDB应用程序等滑动视图的好方法是什么?

[英]What is a good way to manage sliding views like the iPhone IMDB app?

The IMDB app for iPhone seems to allow infinite drill downs and explorations from a movie detail page to a detail page of an actor who was in that movie, to that actor's first movie to that movie's director, etc. 用于iPhone的IMDB应用程序似乎允许从电影详细信息页面到该电影中的演员的详细页面的无限钻取和探索,该演员对该电影导演的第一部电影等。

What is the best way to build this in Xcode? 在Xcode中构建它的最佳方法是什么?

Be sure to check out Apple's UINavigationController documentation/sample code here . 请务必在此处查看Apple的UINavigationController文档/示例代码。 You can learn a lot about iOS development from looking at the sample apps. 通过查看示例应用程序,您可以了解有关iOS开发的大量信息。

The "infinite drill down" you're referring to is the act of "pushing" a controller onto the current stack of controllers. 您所指的“无限钻取”是将控制器“推”到当前控制器堆栈上的行为。 As you go back, you "pop" a controller off the stack to get back to the previous controller. 当你返回时,你将一个控制器“弹出”到堆栈中以返回到前一个控制器。 If implemented properly, UINavigationController will handle things like making sure the Back button contains the title of the previous screen, keeping the screens in order, and the sliding motion. 如果正确实现, UINavigationController将处理诸如确保后退按钮包含上一屏幕的标题,保持屏幕顺序以及滑动动作之类的事情。

Good luck! 祝好运!

您可以使用UINavigationController创建并根据需要逐个推送视图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM