I've got an app that uses a UIWebView. Currently I create the web view using a storyboard but I want to create it programatically.

This needs to work across all devices and iOS 5 - 7.

Currently (using the storyboard) in iOS 6 it looks like this:
![iPhone iOS 6](https://i.stack.imgur.com/mOxrJ.png)

But in iOS 7 you don't get that white bar at the top:
![iPhone iOS 7](https://i.stack.imgur.com/LAhuN.png)

How can I create the UIWebView programatically so that it fills available window space (i.e. doesn't go over tab bar or status bar) across all devices?

Thanks

//EDIT
Here's my storyboard for the UIWebView

![UIWebView Storyboard](https://i.stack.imgur.com/ibIOz.png)

//Edit 2

As per a suggestion I am doing this but it overlaps the status bar and tab bar. Is there any way to take them into account?

```
float width = [UIScreen mainScreen].bounds.size.width; 
float height = [UIScreen mainScreen].bounds.size.height; 

```