I have a UIWindow object that I have want to show on top a Storyboard. That I made like this -
UIWindow *webWindow = [[UIWindow alloc] initWithFrame:CGRectMake(0, 20, 320,480)];
webWindow.windowLevel = UIWindowLevelAlert;
I am making it keyAndVisible like this -
[webWindow makeKeyAndVisible];
The problem is that it's not visible. I tried NSLog to see all the Windows and it shows something like this -
Windows:(
"<UIWindow: 0x9b5cf20; frame = (0 0; 320 480); layer = <UIWindowLayer: 0x9b61400>>",
"<UIWindow: 0x9846880; frame = (0 0; 320 480); layer = <UIWindowLayer: 0x9846a60>>"
)
I read something about how window is used by Storyboard here - http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40006786-CH3-SW30
But its not clear how to use it to show a window on top of Storyboard.
Rather than making a new UIWindow object and adding a subview to had to make object of the app delegate like -ExampleAppDelegate *myApp = (ExampleAppDelegate *)[UIApplication sharedApplication].delegate; And add subView like this - [myApp.window addSubview:aWebView];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With