基于窗口的应用程序或基于导航的应用程序
我正在开始开发一个新的iPhone应用程序,我将实现的界面包含很多这样的轴:
我实际上有两个问题,使用什么合适的模板?基于窗口或导航的应用程序? 第二个问题:在基于导航的应用程序中,运行应用程序时出现的第一个视图是包含 UITableView 的视图,如下所示,我可以将其替换为图像(UIImageView)吗?
i'm starting developing a new iPhone application, the interfaces that i will implement contains a lot of that shaft :
I have actually two question, what the suitable template to use? Window or Navigation based application?
Second question : in the Navigation Based Application, the first view that appears when i run the app is the one that contains a UITableView as below, can i replace it by an Image (UIImageView)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,基于导航的应用程序就是您在这里寻找的。是的,您可以用 UIImageView 替换 UITableView。我倾向于使用基于窗口的项目启动任何项目,这是使用基于窗口的项目的快速方法:
然后在应用程序委托中的 applicationDidFinishLaunching 方法中,创建导航控制器,将其根视图控制器设置为您在上一步中创建的视图控制器,并将 mac 控制器设置为窗口的根视图控制器。这是示例代码:
FirstVC firstVC = [[FirstVC alloc] initWithNibName:@"FirstVC" 包:@"nil"];
UINavigationConroller *navVC = [[UINavigationController alloc] initWithRootViewController:firstVC];
[[self window] setRootViewController:firstVC];
如果您想使用基于导航的项目,那么只需在 initWithRootViewController 中删除模板设置的视图控制器并将其设置为您自己的视图控制器即可。
Yes, Navigation based app is what you are looking for here. And yes, you can replace the UITableView with a UIImageView. I tend to start any project with a Window based project, and here's a quick way of doing it using window based project:
Then in you application delegate, in the method applicationDidFinishLaunching, create a navigation controller, set it's root view controller to the view controller you created in the last step, and set the mac controller as the root view controller of the window. Here's a sample code:
FirstVC firstVC = [[FirstVC alloc] initWithNibName:@"FirstVC" bundle:@"nil"];
UINavigationConroller *navVC = [[UINavigationController alloc] initWithRootViewController:firstVC];
[[self window] setRootViewController:firstVC];
If you want to use a Navigation based project, then simply at the initWithRootViewController, remove the view controller set up by the template and set it to your own view controller.