开发者

Declare an UIView on app delegate

i have problem with showing an UIView on app delegate ... there is no place on interface builder to connect IB开发者_运维知识库Outlet with app delegate .

 [self.view addSubview:UIVIEW];   //doesn't work 


The chances are you don't want to display anything in the app delegate. Typically when you start a new project there will be a MainViewController which is where you want to put new views and such into.

If you don't have that then you'll want to add it to the window property of the app delegate.


your app delegate should have a UIWindow (almost always called window). Add your view as a subview to it (note: dont forget to makeKeyAndVisible your window!)

Check out any of the basic documentation examples for how to use a UIWindow and how to connect it in IB.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜