Why do I add
static UIWindow *window_;
window_ = [[UIWindow alloc]init];
window_.frame = CGRectMake(0, 0, XMGScreenW, 20);
window_.windowLevel = UIWindowLevelAlert;
window_.hidden = NO;
to AppDelegate
or Tarbarcontroller
will crashes, but in the Controller
will not crashes.
I want to take the window covering on the status bar, set the click event。
Crash Message:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application windows are expected to have a root view controller at the end of application launch'