0

Whenever i launch an app with text, i get a white screen (there is 1 more scene). i have tried remaking it and deleting this code. It is on X code and started from the preset "empty Application"

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

GOt this is in debugging

2014-07-18 11:20:43.821 Wallpaper[7635:60b] Application windows are expected to have a root view controller at the end of application launch

i expected to see a table saying address and all i saw was a white screen. Any reason known?

Rish
  • 5
  • 2

1 Answers1

0

Your UIWindow is missing a root view controller, i.e:

self.window.rootViewController = [[UIViewController alloc] init];
Shams Ahmed
  • 4,498
  • 4
  • 21
  • 27
  • where did you put it, should be before makeKeyAndVisible. – Shams Ahmed Jul 18 '14 at 18:39
  • `self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override point for customization after application launch. self.window.backgroundColor = [UIColor whiteColor]; self.window.rootViewController = [[UIViewController alloc] init]; [self.window makeKeyAndVisible]; return YES;` – Rish Jul 21 '14 at 18:19
  • could you up this really need reputation for another question i have – Rish Aug 01 '14 at 18:22