1
FeedContentVC *feedVC= [[FeedContentVC alloc] initWithNibName:@"FeedContentVC" bundle:nil];
navigationController = [[UINavigationController alloc] initWithRootViewController:feedVC]; 
navigationController.navigationBar.barStyle = UIBarStyleBlack; 
[window setRootViewController:navigationController];
Dharmesh Dhorajiya
  • 3,976
  • 9
  • 30
  • 39
  • possible duplicate of [Applications are expected to have a root view controller at the end of application launch](http://stackoverflow.com/questions/7520971/applications-are-expected-to-have-a-root-view-controller-at-the-end-of-applicati) – Rumin Sep 21 '15 at 06:46

2 Answers2

0

Although things looks correct in what you are doing, could you please confirm following:

  1. window is a strong property in your AppDelegate. It should be [self.window setRootViewController:navigationController].
  2. Put a breakpoint and check that feedVC is not nil.
  3. You have this statement in your code [self.window makeKeyAndVisible];.
Abhinav
  • 37,684
  • 43
  • 191
  • 309
0
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
        self.window.backgroundColor = [UIColor whiteColor];
        [self.window makeKeyAndVisible];
        FeedContentVC *feedVC= [[FeedContentVC alloc] initWithNibName:@"FeedContentVC" bundle:nil];
        navigationController = [[UINavigationController alloc] initWithRootViewController:feedVC]; 
navigationController.navigationBar.barStyle = UIBarStyleBlack;
        [self.window setRootViewController:navigationController];
Idrees Ashraf
  • 1,363
  • 21
  • 38