我有一个奇怪的问题,不知道我应该发布哪个代码,因为我不知道问题出在哪里,但如果你需要,请索取更多代码示例;
我的应用程序是用“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.
更多推荐
发布评论