战斗与Xcode不显示我的UIWindow [英] Battling with Xcode not displaying my UIWindow

查看:209
本文介绍了战斗与Xcode不显示我的UIWindow的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请参阅问题末尾的编辑

See edit at the end of the question

我想要一个简单的iPhone应用程式(

I'm trying to get a simple iPhone app up and running and failing miserably :(

我有一个非常简单的设置,我有一个应用程序委托,一个视图控制器和一个包含<$ c的xib文件$ c> UIWindow 与 UIImageView 和三个 UIButton 当我启动我的应用程序时, UIWindow 从不显示。

I have a very simple set up. I have an app delegate, a view controller, and an xib file containing a UIWindow with a UIImageView and three UIButtons on it. The problem is that when I start my app, the UIWindow never gets displayed.

在Interface Builder中(我正在运行XCode 4)。我只是完全失去了可能是什么导致的问题。

I'm sure I'm just missing some sort of connection in Interface Builder (I'm running XCode 4, by the way). I'm just completely lost as to what might be causing the problem.

我非常感谢这个解释不是很好,所以如果有任何相关问题,请随时问他们!

I appreciate that this explanation is not great, so if anyone has any pertinent questions please feel free to ask them!

编辑:好的,我可以重新创建我的问题,如果我创建一个基于视图的应用程序,然后添加一个按钮(试图滑块)到创建的窗口,当我编译和运行,该按钮不显示。

Edit: Ok, I can re-create my problem exactly. If I create a "View based" application, then add a button (tried a slider too) to the created window, when I compile and run, the button does not show up. What gives?

推荐答案

是否添加控件到窗口nib或视图控制器的nib?

Are you adding controls to the window nib or the view controller's nib?

将控件添加到视图控制器nib。

Add your controls to the view controller nib.

这篇关于战斗与Xcode不显示我的UIWindow的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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