我是初学者,想知道如何在基于窗口的应用程序中添加视图。将我的第一个视图添加到基于窗口的应用程序
我打包应用程序,然后将ViewControler + XIB添加到我的项目中。 我在两个AppDelegate-Files中都包含.h文件。
然后,我创建的视图 “StartViewController” 的对象,具有
StartViewController *startView;
,并在AppDelegate.h文件添加属性:
@property (nonatomic, retain) StartViewController *startView;
在AppDelegate.m我补充:
@synthessize startViewController
和申请方法:
[window addSubview:startViewController.view];
但是,当我启动应用程序时,它没有出现,我忘了?
有你连接与Interface Builder中的UIView? ? ?? – 2010-08-19 09:17:47