You can have all of your views occupying part of the screen, and your UIWebView will take care of the rest. The logic of switching between other views should remain unchanged.
For example, in your viewDidLoad method for your UIViewController s, you might have something like:
self.view.frame = CGRectMake(0, 100, 320, 380);
And in your (say) AppDelegate , you will have a regular call to show the main UIViewController (in your case, does it sound like a UITabBarController ?), And there is also a call to add a UIWebView . Say something like:
myWebView.view.frame = CGRectMake(0, 0, 320, 100);
View controllers and UIWebView will not be independent of each other.
You see this pattern, I suppose, with applications that have iAds. I did something similar using one of my free apps.
Hope this helps!
source share