Upgrade to iPhone 3.0 sdk and now simulator shows

2020-03-24 03:50发布

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.

8条回答
爷、活的狠高调
2楼-- · 2020-03-24 04:43

I didn't have to change any alpha value settings. All I did was quit Interface Builder before trying to launch my project in the iPhone Simulator. For some reason if IB is open the first time you run the simulator it will give you a blank screen, so quit out of IB before running the project for the first time.

查看更多
爱情/是我丢掉的垃圾
3楼-- · 2020-03-24 04:44

I fixed mine by changing the mode from Scale To Fill to Center. Before I changed the alpha and all it did was change the background to black. I figured perhaps the actual values were not scaling correctly, and I was correct. Again, simply change the mode from Scale To Fill to Center and voilà, it should work.

查看更多
登录 后发表回答