thndrkiss
thndrkiss

Reputation: 4595

hiding tabbar and navbar

I have a uiwebview in a navigation bar which is in turn inside a tabbar item. I want to know how to hide the tabbar and navigation bar the moment the user takes off his finger from the screen just like hiding the toolbar in the default photos app in the iPhone.

I should also be able to show the tabbar and the navigation bar when i touch my uiwebview again.

Upvotes: 0

Views: 957

Answers (1)

element119
element119

Reputation: 7625

By default, a UIWebViewDelegate is not equipped to receive touch events... however, if you subclassed the UIWebView as UIControl (which can accept touch events), you could link the UIWebView's touchUpInside: method provided by UIControl to code that hides the navigation bar.

To hide the navigation bar, you could use:

[self.navigationController setNavigationBarHidden:YES animated:YES];

Then, you could use similar UIControl implementation do detect when a finger has left the UIWebView, etc.

Upvotes: 2

Related Questions