Cocoa Touch,要使用:窗口模板或视图模板? [英] Cocoa Touch, which to use: Window Template or View Template?

查看:128
本文介绍了Cocoa Touch,要使用:窗口模板或视图模板?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有另一个与视图相关的问题,我在这里总是处理视图和Windows。我对iPhone开发的所有基本原理的理解已经颠倒了。



有人可以解释或指向一个参考,这两个模板之间的区别吗?



应用程序不显示在界面生成器中的一个窗口。我应该有一个吗? c> 基于窗口的应用程序 c $ c>模板只提供一个应用程序委托和一个窗口。



A 基于视图的应用程序



您的应用程序不会显示窗口,因为您(很可能)查看的视图和编辑现在由窗口加载,该窗口在单独的XIB中。


I have another issue related to Views, and i've ended up here dealing with Views and Windows in general. My understanding of all the fundamentals of iPhone development has been turned upside down.

Can somebody explain, or point to a reference, the difference between these 2 templates?

Ex: My app doesnt show a Window in the Interface Builder. Should I have one? When should i have one and when should I not?

解决方案

The Window-based Application template provides just an application delegate and a window.

A View-based application will start you off with an application delegate and a window, as well as a view.

Your application doesn't show a Window because the view that you are (most likely) viewing and editing now is loaded by the Window, which is in a separate XIB.

这篇关于Cocoa Touch,要使用:窗口模板或视图模板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆