Search code examples
iphoneobjective-ciosthree20

Showing a UIWebView in a Tabbar with control like TTWebController


Are there any existing open source UIWebView control (with back/forward buttons) that is suitable to be used with a UITabBarController?

I have tried to use the TTWebController, but the issue is the button controls is at the bottom, so they stack with the tabbar, the layout is strange then.

I would prefer if any open source web controller has buttons control at the top of the view.


Solution

  • One way to accomplish it is by subclassing TTWebController, and repositioning the web controller toolbar in the loadView function:

    ///////////////////////////////////////////////////////////////////////////////////////////////////
    - (void)loadView {
     [super loadView];
    
     _toobar.frame = CGRectMake(0,0, self.view.size.width, TTToolbarHeight());
    }