To create a new UIWindow over the main window
UIWindow *window1 = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, 320, 320)]; window1.backgroundColor = [UIColor redColor]; window1.windowLevel = UIWindowLevelAlert; [window1 makeKeyAndVisible]; Finally I know why it doesn’t work, because window1 is a method var, and it will lost after the method executed. So I declare a new @property for it, as @property (strong, nonatomic) UIWindow *window2; and change … Read more