简体   繁体   English

为什么在iOS加载屏幕后出现空白?

[英]Why am I getting a blank slate after the iOS loading screen?

My app is displaying the correct iOS loading screen, and then a white screen. 我的应用显示正确的iOS加载屏幕,然后显示白屏。

Is it incumbent on me to overwrite the white screen appropriately? 我有责任适当地覆盖白屏吗? Before I added loading screens, I had a background view loaded, and images on top of it. 在添加加载屏幕之前,我已加载了背景视图,并在其上方添加了图像。 Now it just is plain white. 现在只是纯白色。

For displaying the background correctly, does it make sense to have a draw screen method, called from viewDidLoad and from viewDidRotate, and tackle things from there? 为了正确显示背景,有一个绘制屏幕方法(从viewDidLoad和viewDidRotate调用)并从那里处理问题有意义吗?

I have a ContainerView under a ScrollView, and the ScrollView is provisionally 150x150, which should even if it clips things show non-white pixels inside. 我在ScrollView下有一个ContainerView,并且ScrollView临时为150x150,即使它裁剪的东西也应该显示内部非白色像素。

What should I do to get real diagnostics? 我应该怎么做才能得到真正的诊断?

My app is displaying the correct iOS loading screen, and then a white screen. 我的应用显示正确的iOS加载屏幕,然后显示白屏。

Something is wrong with your initial view controller, or with the view that it's supposed to load. 您的初始视图控制器或应该加载的视图出了问题。

Is it incumbent on me to overwrite the white screen appropriately? 我有责任适当地覆盖白屏吗?

The white screen is probably either your app's window or an empty view. 白屏可能是您应用程序的窗口或空白视图。 Normally, your app delegate would create a root view controller and load its view into the app's window (possibly automatically if you're using storyboards). 通常,您的应用程序委托将创建一个根视图控制器,并将其视图加载到应用程序的窗口中(如果使用情节提要,则可能自动生成)。 It sounds like something happened to adversely affect that process -- your storyboard was changed, your Info.plist (which points the app to the right storyboard or .xib file) was changed, etc. 听起来好像发生了一些不利于该过程的事情-您的情节提要已更改,Info.plist(将应用程序指向正确的情节提要或.xib文件)已更改,等等。

For displaying the background correctly, does it make sense to have a draw screen method, called from viewDidLoad and from viewDidRotate, and tackle things from there? 为了正确显示背景,有一个绘制屏幕方法(从viewDidLoad和viewDidRotate调用)并从那里处理问题有意义吗?

That shouldn't be necessary, at least in the context of your current problem. 至少在当前问题的情况下,这不是必需的。

What should I do to get real diagnostics? 我应该怎么做才能得到真正的诊断?

Use the debugger. 使用调试器。 Is the window's root view controller pointing to an instance of the correct class? 窗口的根视图控制器是否指向正确类的实例? If yes, does its view property point to the correct view? 如果是,它的view属性是否指向正确的视图? If yes, does the view contain the appropriate objects? 如果是,视图是否包含适当的对象?

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

相关问题 在Swift 4中解析JSON后,为什么会得到空白的UITableView? - Why am I getting a blank UITableView after parse JSON in Swift 4? 为什么在加载TableViewcontroller时出现此错误 - Why am I getting this error when loading my TableViewcontroller 为什么在OS 3.1上的应用程序中看不到加载屏幕,但在4.0上却显示? - Why am I not seeing a loading screen in my application on OS 3.1, but I am on 4.0? 为什么我收到来自此请求iOS JSON的空响应 - Why am I getting Empty Response from this Request iOS JSON iOS:为什么我在Xcode中得到“未使用的变量”? - iOS : Why am I getting 'Unused variable' in Xcode? 没有可用的兼容iOS版本的预配置iOS设备,为什么会出现此错误? - No provisioned iOS devices are available with a compatible iOS version,Why i am getting this error? 为什么我将高度设为0 - Why I am getting the altitude as 0 我在Xcode for iOS中得到了“枚举类型的隐式转换”警告,我不知道为什么 - I am getting an “Implicit conversion from enumeration type” warning in Xcode for iOS and I don't know why 当我从经度和纬度创建位置字符串时,为什么我在iOS中收到此链接器错误? - Why am I getting this linker error in iOS when I create location strings from longitude and latitude? iPhone:为什么在模拟 memory 警告后屏幕 go 空白? - iPhone: Why does screen go blank after simulate memory warning?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM