xcode ios模拟器显示黑屏
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19040925/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ios simulator shows black screen
提问by avi
Xcode 5 ios simulator stopped working for one of the applications I was developing it works on any other project, there is no build error or anything the simulator opens but there's only a black screen showing.
Xcode 5 ios 模拟器停止为我正在开发的应用程序之一工作,它适用于任何其他项目,没有构建错误或模拟器打开的任何内容,但只显示黑屏。
回答by ppaulojr
You can reset the simulator using the Reset Content and Settings...
您可以使用 Reset Content and Settings...
回答by rockstarberlin
Sometimes the simulator get hung for no obvious reasons. Xcode shows in the status display that the app is running.
有时模拟器会因为没有明显原因而挂起。Xcode 在状态显示中显示应用程序正在运行。
If this happens i click the home button of the simulator and then immediately click the app icon again. Then the app appears again and everything is visible wihtout stopping the app or the debugger.
如果发生这种情况,我单击模拟器的主页按钮,然后立即再次单击应用程序图标。然后应用程序再次出现,一切都可见,无需停止应用程序或调试器。
回答by Graham S.
In some cases where hitting Reset Content and Settings...
does not work, it may be due to the background the of the screen being set to Default
. This was the issue in my case.
在某些点击Reset Content and Settings...
不起作用的情况下,可能是由于屏幕的背景设置为Default
。这就是我的问题。
If this is the case (for anyone who may be having the same problem I did), just click on empty area of the storyboard screen being displayed and switch the background from Default
to something else, like White
for example:
如果是这种情况(对于可能遇到我遇到的相同问题的任何人),只需单击正在显示的故事板屏幕的空白区域并将背景切换Default
为其他内容,White
例如:
Change Background
from this:
Background
从此改变:
To this:
对此:
回答by nikdange_me
I initially made a not needed Referencing outlet of button in a internal View [inside main View] to main View. Whenever i used to make changes on storyboard, "main View" [not entire screen] displayed black screen. After removing button reference, it worked properly.
我最初在一个内部视图 [inside main View] 中创建了一个不需要的按钮引用出口到主视图。每当我曾经在情节提要上进行更改时,“主视图”[不是整个屏幕] 都会显示黑屏。删除按钮引用后,它工作正常。
I'm in learning stage, made a attempt to help.
我在学习阶段,试图帮助。
回答by Jayprakash Dubey
Solution 1 :Quit simulator
then clean Xcode (both clean and clean build folder) and then run again.
解决方案 1:Quit simulator
然后清理 Xcode(清理和清理构建文件夹),然后再次运行。
Solution 2(Recommended) : Go to iOS Simulator
-> Reset Content and Settings...
解决方案 2(推荐):转到iOS Simulator
->Reset Content and Settings...
This will pop-up an alert stating 'Are you sure you want to reset the iOS Simulator content and settings?'
这将弹出一个警告说明 'Are you sure you want to reset the iOS Simulator content and settings?'
Select Reset
button. Note that once you reset simulator content all app installed on simulator will be deleted and it will reset to initial settings.
选择Reset
按钮。请注意,一旦您重置模拟器内容,模拟器上安装的所有应用程序都将被删除,并将重置为初始设置。
回答by Janne
Try to reset as described above: (see: Reset Content and Settings...)
尝试按上述方法重置:(请参阅: 重置内容和设置...)
If it still didn't help try to scale from the simulator menu;
如果它仍然没有帮助尝试从模拟器菜单缩放;
select Windows--->scale--> %25 or%33 etc.
选择Windows--->scale-->%25或%33 等。