ios 基于页面的应用程序和基于视图的应用程序之间的区别
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15629020/
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
difference between page based application and view based application
提问by kpamar06
I'm new in iOS development and I'm just following some tutorials on youtube, I'm confused between page based applicationtemplate and view based applicationtemplate. I'm using xcode 4.6and the tutorial I'm following has page based application using xcode 4.0using a view based application. Xcode 4.6 has no view based application.
我是 iOS 开发的新手,我只是在学习 youtube 上的一些教程,我对基于页面的应用程序模板和基于视图的应用程序模板感到困惑。我正在使用xcode 4.6,我正在关注的教程使用基于视图的应用程序使用xcode 4.0 的基于页面的应用程序。Xcode 4.6 没有基于视图的应用程序。
What are the difference of page base application and view based application in Xcode? Are they the same?
Xcode 中基于页面的应用程序和基于视图的应用程序有什么区别?他们是一样的吗?
回答by Anil Varghese
Page based applicationand view based applicationsare just templatesonly that makes your job a little bit easier. Depending upon your template selection Xcode
will automatically generate some files and use some controls. It is not necessary to start with such kind of template you can even start with an empty application. There you are designing from scratch. You can choose a template based on type of your application.
基于页面的应用程序和基于视图的应用程序只是模板,只是为了让您的工作更轻松一些。根据您的模板选择Xcode
将自动生成一些文件并使用一些控件。没有必要从这种模板开始,您甚至可以从一个空的应用程序开始。你从头开始设计。您可以根据应用程序的类型选择模板。
Inorder to find the difference just create applications using both templates and run it. Page based applicationuses pageViewControllerthat switches pages while swiping just like turn pages of a book. single view applicationcreates a single view controller and its view. If you choose single single view application initially dont worry. Add pageViewControllerand design properly, you can make it as a Page based application
为了找到差异,只需使用这两个模板创建应用程序并运行它。基于页面的应用程序使用pageViewController在滑动时切换页面,就像翻书一样。单视图应用程序创建一个单视图控制器及其视图。如果您最初选择单视图应用程序,请不要担心。添加pageViewController并正确设计,您可以将其作为基于页面的应用程序