I have an iPhone app that uses an UITabBarController, which contains two UINavigationControllers, each of which in turn contains one or more TableViewControllers (actually, customized UIViewControllers implementing UITableViewDelegate and UITableViewDataSource. ) On launch, it displays the UITabBarController with one of the tableviews displayed. Everything is coded; Interface Builder was NOT used to make any of the UI stuff. It was written in SDK 2. It worked fine in sdk 2.
I recently updated to SDK 3.0. In Info, I set the Base SDK setting to iPhone Simulator 3.0. Now, when I launch the application in Simulator, I see only a blank white screen with the status bar at the top. No signs of my app. However, when I exit the app, the missing tableview displays briefly as the exiting animation is playing. Also, on the blank white screen I can still click where the navigation buttons should be and find that, when I exit the app and the missing screen briefly displays, that navigation has taken me to another screen. So the buttons work, and presumably the tableviewcells are there, they just cannot be seen.
Has anyone seen anything like this? Does anyone have any idea what is causing it and how I can fix it? I noticed that sample apps, such as SQLiteBooks, seem to work fine when updating to SDK 3.0. My app isn't very much different from SQLiteBooks in terms of technologies used, except that, as I said above, I do not use Interface Builder.
I had the same problem of getting white screen on iphone simulator after upgrading my iOS to 4.2
After trying all the above solutions given by the people in this thread and nothing effecting the problem,
I tried modifying the following code in the
method.... by writing this code...
It appears you have to save the new interface before running. I have never developed for IPhone before and finally figured out why i was getting a white screen. Seems like it should save automatically before running but apparently it doesn't.
In IB, click "Window" and make sure "Visible At Launch" is checked. Mine wasn't and my app finally appeared after checking that box.
I also have this issue, I coud solved doing the following:
In Interface builder:
In XCode: - If you are using 3.0 or upper, comment this code line in your application delegate:
// window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]
If you're building your window purely in code, be sure to remove the MainWindow.xib from the properties in your target.
If that's not the problem, I have had similar issues before with apps behaving strangely on launch. I'm not sure what the root cause, so it's trial and error for me:
1) Try deleting the build directory and rebuilding.
2) Set the base SDK to iPhone Device 3.0. (The base SDK is overwritten when you build for the simulator anyway)
3) I also had an issue one time where the project plist file and MainWindow.xib got deleted from my project accidentally, and it caused this identical issue. Double check to make sure they are in your project structure if you are using MainWindow.xib.
Yes, I finally found the simple fix - open Window in MainWindow.xib, change the Alpha value to 0 (default is 100).