Custom UIwindow not display
问题 I'm trying to create a new window for Custom alert on rootViewController. - (void)viewdidAppear { UIWindow *newWindow = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; newWindow.windowLevel = UIWindowLevelAlert + 1.0f; newWindow.backgroundColor = [UIColor redColor]; newWindow.hidden = NO; UIViewController *vc = [[UIViewController alloc] init]; vc.view.backgroundColor = [UIColor blueColor]; newWindow.rootViewController = vc; [newWindow makeKeyAndVisible]; But the newWindow not