ios - Terminating app due to uncaught exception reason: 'Application windows are expected to have a root view controller at the end of application launch' -


feedcontentvc *feedvc= [[feedcontentvc alloc] initwithnibname:@"feedcontentvc" bundle:nil]; navigationcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:feedvc];  navigationcontroller.navigationbar.barstyle = uibarstyleblack;  [window setrootviewcontroller:navigationcontroller]; 

although things looks correct in doing, please confirm following:

  1. window strong property in appdelegate. should [self.window setrootviewcontroller:navigationcontroller].
  2. put breakpoint , check feedvc not nil.
  3. you have statement in code [self.window makekeyandvisible];.

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -