iPhone:将我的应用程序迁移到IOS 5后启动时出现奇怪的空白屏幕(iPhone:Weird blank white screen at startup after migrating my ap

编程入门 行业动态 更新时间:2024-10-27 00:24:38
iPhone:将我的应用程序迁移到IOS 5后启动时出现奇怪的空白屏幕(iPhone:Weird blank white screen at startup after migrating my app to IOS 5)

我有一个奇怪的问题,不知道我应该发布哪个代码,因为我不知道问题出在哪里,但如果你需要,请索取更多代码示例;

我的应用程序是用“Xcode 3.2和IOS 4.3”构建的。最近我开始使用Xcode 4.2和基础IOS 5; 使用新环境打开我的项目并将部署目标设置为IOS 4.3。 应用程序同样好,但我有一个问题;

应用程序从启动画面开始,然后我应该从导航控制器看到第一个视图,但我看到一个空白的白色屏幕! 并且它保持不动..然后这是令人惊讶的; 当我按下主页按钮,然后从暂停模式再次打开应用程序,然后我可以正确获得第一个视图! 我应该检查我的代码的哪些部分? 或者它是我可以从构建设置修复的配置问题? 当我调试时,我可以点击viewController的“viewDidAppear”方法,但实际上我看到的只是一个白色屏幕。

谢谢。

I have a weird problem, dont know which code should I post because I dont know where is the problem, but please ask for more code sample if you need;

My app was build with "Xcode 3.2 and IOS 4.3" Then recently I started to use Xcode 4.2 with base IOS 5; Opened my project with new environment and set deployment target to IOS 4.3. App works same and well but I have one problem;

App starts with splash screen well and then I supposed to see the first view from the navigation controller but instead I see a blank white screen! and it stays still..then here is the surprize; when I press home button and then open app again from suspended mode then I can get the first view correctly! Which parts of my code should I check? Or is it a configuration problem I can fix from build settings? When I debug I can hit the "viewDidAppear" method of the viewController but actually all I see is a white screen.

Thanks.

最满意答案

如果您在代码中创建主UIWindow,但是在nib文件中定义了额外的UIWindow,您经常会看到这一点。 在iOS 4中,您在代码中创建的窗口显示在nib定义的窗口上方。 在iOS 5中,它是另一种方式 - 空的笔尖定义窗口出现在您在代码中创建的窗口上方。

如果您在代码创建主窗口,请检查您的nib文件,删除任何额外的窗口并从info.plist文件中删除主Nib文件设置。

You often see this if you are creating your main UIWindow in code but there is an extra UIWindow defined in your nib file. In iOS 4 the window you create in code appears above the nib-defined window. In iOS 5 it is the other way round - the empty nib-defined window appears above your window created in code.

If you are creating your main window in code then check your nib file, remove any extra window and remove the Main Nib File setting from your info.plist file.

更多推荐

本文发布于:2023-08-07 15:52:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464694.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:启动时   应用程序   空白   奇怪   屏幕

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!