Upgrade to iPhone 3.0 sdk and now simulator shows blank screen

前端 未结 8 1290
轻奢々
轻奢々 2021-01-13 08:47

I have an iPhone app that uses an UITabBarController, which contains two UINavigationControllers, each of which in turn contains one or more TableViewControllers (actually,

8条回答
  •  隐瞒了意图╮
    2021-01-13 09:01

    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

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
    

    method.... by writing this code...

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {  
    
    
    
        // HomeScreen is my first view that should be displayed on the app launch
        // Creating the homescreen instance in the appdelegate method and 
        // assigned it to the homeScreenWindow element declared in the appdelegate class
    
        HomeScreen *aHomeScreen = [[HomeScreen alloc]initWithNibName:@"HomeScreen" bundle:nil];
        self.homeScreenWindow = aHomeScreen;
        [aHomeScreen release];
        // assigning ends here
    
        [window addSubview:[homeScreenWindow view]];
        [window makeKeyAndVisible];
    
        return YES;
    }
    

提交回复
热议问题