简体   繁体   English

Xcode App模拟并启动黑屏

[英]Xcode App Simulates and Launches Black Screen

When I launch my iOS app it seems that I only get a black screen on both device and simulator. 当我启动我的iOS应用程序时,似乎在设备和模拟器上都只会出现黑屏。 I'm running Xcode 4.4.1 and the iOS sim is set up for 5.1. 我正在运行Xcode 4.4.1,并将iOS sim设置为5.1。 Is there any information you can give to help me out here? 您可以提供任何信息来帮助我吗? I'm pretty sure it's the viewController, but I'm not sure. 我很确定这是viewController,但不确定。

No background image No change in colors Basic App (Text boxes/Ad Bar/Nav Bar/Table Cells) - All objects are available in Xcode (haven't messed with the coding yet) 没有背景图片没有颜色变化基本应用程序(文本框/广告栏/导航栏/表格单元格)-所有对象均在Xcode中可用(尚未与编码混淆)

screen cap img link: http://imgur.com/T4QUI 屏幕盖img链接: http//imgur.com/T4QUI

Code to come! 代码来了!

I've been working on this app all morning and I think I figured out my problem. 我整个上午都在研究这个应用程序,我想我已经解决了问题。 So it turns out the problem was the "Ad BannerView" that I had put on the main View. 事实证明,问题出在我放在主视图上的“广告横幅视图”上。 Deleted it and it simulates just fine. 删除它,它模拟就好了。

Not sure what caused it to do that, and if anyone knows, I'd very much appreciate a little bit more learning. 不知道是什么原因导致的,所以,如果有人知道,我将不胜感激。

If you guys have anymore advice for me on here or in Xcode I'd love to hear it. 如果你们在这里或Xcode上对我有任何建议,我很想听听。

Thanks a ton for the help guys! 多谢您的帮助!

i Know i am late but i am posting it, If it could help someone else. 我知道我迟到了,但我正在发布它,如果它可以帮助其他人。

You may probably removed your initial viewController, You can set it by followed 您可能会删除了最初的viewController,可以通过以下方式进行设置

  1. Go to main storyboard 转到主故事板
  2. select viewController you want to show up first 选择要首先显示的viewController
  3. in attributing inspector you will see "Is Initial ViewController" with a checkbox 在属性检查器中,您将看到带有复选框的“ Is Initial ViewController”
  4. mark is checked(tick sign) and give it a run. 标记被选中(勾号)并运行。

You have to provide image for that the size of image for iPhone should be 320,480 and 640 , 960 with name Default.png , Defauld@2x.png , and image should on root of aproject. 您必须提供以下图像:iPhone的图像大小应为320,480和640,960,名称为Default.png,Defauld@2x.png,并且图像应位于项目的根目录下。 or you can select your image form XCode. 或者,您可以选择图像形式的XCode。 选择Projecte启动图像和图标

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM