adit
adit

Reputation: 33644

how to set the UIWebView starting offset

I have a UIWebView in which y origin I set the same as the UINavigationBar (both 0). I have a .95 alpha set on my UINavigationBar, the goal is so that when I scroll the UIWebView up I can sort of see the content of the UIWebView a bit. However the issue is that when I do this the content of the UIWebView starts from the top. How do I make it so that the content when initially start is below the UINavigationBar and not behind

Upvotes: 2

Views: 3684

Answers (2)

calimarkus
calimarkus

Reputation: 9977

You could set webView.clipsToBounds = NO;. That could work. Also, since iOS5 you can find the UIScrollView within the webView and set a contentInset value.

See: UIWebView under transparent UINavigationBar

Upvotes: 1

ravi
ravi

Reputation: 389

Try this: If your navigation bar is translucent the web view will start behind the nav bar , if u make it translucent = NO then it starts right below , hep this might help

Upvotes: 0

Related Questions