Xcode 5 Simulator Blank White Screen

I just installed Xcode 5 (or the latest version) and created a new project. I created a storyboard and added a shortcut, but when I open my application in the iPhone simulator, I just get a blank white screen with a status bar. What am I doing wrong?

I have OS X 10.9.1 Mavericks.

enter image description here

+3
source share
7 answers

I know that I am very late for this, but the solution to this problem is quite simple and is even shown in one of Apple's own tutorials .

Assuming you started with an "Empty Project", created a storyboard from scratch, and configured the storyboard as the main interface, you need to delete several lines in the first AppDelegate.m method.

It:

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
    return YES;

:

    return YES;
+3

, , , .

, .

" " , .

enter image description here

" " "" .


AppDelegate.m. :

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"YOUR_STORYBOARD_NAME" bundle:[NSBundle mainBundle]];
    UIViewController *vc =[storyboard instantiateInitialViewController];
    self.window.rootViewController = vc;
    [self.window makeKeyAndVisible];
    return YES;
}
+2

. , "Single view", . .

+2

:

, " nib". "" .

enter image description here

:

, " ". . , "Hello, World", .

" ".

+1

. . , , , , . , , 9.2 , 9.1 ( , Xcode > > . , . . Simulator: Hardware > Device > 9.1 , ...

, .

SithAdmin

+1

( ) . , . , .storyboard( LaunchScreen.storyboard , , , ). , , , : Main, LaunchScreen...

0

Click " Main.storyboard " → in the right panel " Document of the interface designer " uncheck the Use automatic layout , Use size classes "and" Use as lunch screen "

0
source

All Articles