I want to add a temporary view over the current presented viewcontroller which covers the entire screen.After some research I found that I should add this screen as a subview of current UIWindow.I used the following code.But the view is not covering the entire screen.
`UIWindow* mainWindow = [[UIApplication sharedApplication] keyWindow];
//mainWindow.frame=self.view.frame;
_autoPlayViewBackground.frame=self.view.frame;
_autoPlayViewBackground.hidden=NO;
[mainWindow addSubview:_autoPlayViewBackground];`
This code is giving a window towards a side.Any help would be a great help.