你如何在 Xcode 中为 iPhone 制作一个多页应用程序?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9219233/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do you make a multi-page app in Xcode for IPhone?
提问by user1186514
I am new to Xcode and am having trouble with my single view/view-based application for iPhone.
我是 Xcode 的新手,在使用 iPhone 的单一视图/基于视图的应用程序时遇到了问题。
I have 2 buttons on the view and I need simple beginner instructions on how to make 1 button go to a different page and have a back button and have the other button on that view do the same as the first button.
我在视图上有 2 个按钮,我需要关于如何使 1 个按钮转到不同页面并有一个后退按钮以及让该视图上的另一个按钮与第一个按钮执行相同操作的简单初学者说明。
Can anyone help? Thanks!
任何人都可以帮忙吗?谢谢!
回答by picciano
You are likely looking for a UINavigationController. There are many good tutorials for getting started with that.
您可能正在寻找 UINavigationController。有很多很好的教程可以开始使用。
This has links to some sample code: https://developer.apple.com/library/IOs/#documentation/UIKit/Reference/UINavigationController_Class/Reference/Reference.html
这有一些示例代码的链接:https: //developer.apple.com/library/IOs/#documentation/UIKit/Reference/UINavigationController_Class/Reference/Reference.html
回答by Raymond Wang
You need navigation based app. Take a look at here: https://developer.apple.com/library/IOs/#documentation/UserExperience/Conceptual/TableView_iPhone/TableViewAndDataModel/TableViewAndDataModel.htmlto understand what a navigation based app and how that works with uitableview.
您需要基于导航的应用程序。看看这里:https: //developer.apple.com/library/IOs/#documentation/UserExperience/Conceptual/TableView_iPhone/TableViewAndDataModel/TableViewAndDataModel.html了解什么是基于导航的应用程序以及它如何与 uitableview 一起使用。