Im getting this warning "Application is expected to have a root view controller at the end of application launch". Ive read all the other answers and I know why its doing it, but im not sure how to get around it.
I have the following code in my viewDidLoad that is causing the error
//animated header that displays errors over status bar
self.dropdown = [[UIWindow alloc] initWithFrame:CGRectMake(0, -20, 320, 20)];
self.dropdown.backgroundColor = [UIColor redColor];
self.label = [[UILabel alloc] initWithFrame:self.dropdown.bounds];
self.label.textAlignment = NSTextAlignmentCenter;
self.label.font = [UIFont systemFontOfSize:12];
self.label.backgroundColor = [UIColor clearColor];
[self.dropdown addSubview:self.label];
self.dropdown.windowLevel = UIWindowLevelStatusBar;
[self.dropdown makeKeyAndVisible];
[self.dropdown resignKeyWindow];
//needed to hide empty cells at the end of table view.
self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
If i put that code in viewWillAppear, i dont get the error. THe problem is I dont want it there. I want it in view did load so it only runs once. Can I just ignore the warning, or can I manually set the root in my app delegate or something. I really want to keep it in view did load. Im using storyboards.
Thanks