I wanted to add a view in UIWindow
with following code:
AppDelegate *delegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
UIWindo
If are you using UINavigationController
Use:
[self.navigationController.view.window addSubview:aView];
If are you using UITabBarController
Use:
[self.tabBarController.view.window addSubview:aView];
In AppDelegate
you can directly assign a view to window. In appDelegate
didFinishLaunchingWithOptions
method Use:
[self.window addSubview:aView];
Hope it helps...