Is it possible to add a subview over the window from a uiviewcontroller and then removing that also?
Thanks Pankaj
You can use like this too.
For adding:
[[UIApplication sharedApplication].keyWindow.rootViewController addChildViewController:childVC];
[[UIApplication sharedApplication].keyWindow.rootViewController.view addSubview:childVC.view];
For removing:
[childVC.view removeFromSuperview];
[childVC removeFromParentViewController];
[[UIApplication sharedApplication].keyWindow.subviews.firstObject addSubview:yourView];
if you are using an iPad in landscape you should add your view over ther window's first subview.
@Yuvaraj.M this is the solution to your problem
It works for me:
[[[[UIApplication sharedApplication] windows] objectAtIndex:0] addSubview:yourView];
Not sure what you mean...
[self.view addSubview:yoursubview];
[yoursubview removeFromSuperview];
Over the window:
[[[UIApplication sharedApplication] keyWindow] addSubview:yourview];