I am trying to add a subview in between statusbar and navigationbar, so I have set the y position = 0 and after that I am reducing UIApplication Keywindow size so that it would free up space on top.
but the status bar is looking odd and it has been shifted too.

The navigationbar is shifted downwards, that's okay. but I need to show proper statusbar also. Here is my code.
float yPosition = 0;
CGRect fr = CGRectMake(0, yPosition, UIScreen.mainScreen.bounds.size.width, 40);
runningCallView.frame = fr;
[UIApplication sharedApplication].keyWindow.frame = CGRectMake(0, 40, UIScreen.mainScreen.bounds.size.width, UIScreen.mainScreen.bounds.size.height-40);
[[UIApplication sharedApplication].keyWindow.rootViewController.view addSubview:runningCallView];```
Can anyone please help on this. Thank you.
I've solved the problem. Now instead of shifting keyWindow downwards, I've shifted down the rootviewController.
and added a statusbar subView to show a fake subview on top. Also UiWindow needed to be subclasses to detect touch on the extra addedView.