I am currently designing a web browser that does server side filtering and I am having a slight issue making the appearance of it be as identical to the mobile Safari browser packaged with the OS.
When you start to scroll down on a webpage, the toolbar that contains the address bar goes up with the webpage, as if they were one in the same.
I have tried using a ScrollView and putting the toolbar and UIWebView in there, but then the webview becomes not scrollable.
How can I render this effect, with the UIWebView being scrollable, and making the toolbar in essence disappear?
I am currently designing a web browser that does server side filtering and I am having a slight issue making the appearance of it be as identical to the mobile Safari browser packaged with the OS.
When you start to scroll down on a webpage, the toolbar that contains the address bar goes up with the webpage, as if they were one in the same.
I have tried using a ScrollView and putting the toolbar and UIWebView in there, but then the webview becomes not scrollable.
How can I render this effect, with the UIWebView being scrollable, and making the toolbar in essence disappear?
Thanks a lot,
ronm3xico
isnt the webview a class of scrollview.
you should be able to find the view inside and check its a scrollview, then check its vertical scroll.
you should be able to find the view inside and check its a scrollview, then check its vertical scroll.
The WebView is a scrollview, but what I need to accomplish is somehow integrate the top address bar, into that webview, so that way when I scroll down on a webpage, the bar disappears out of view with it.
To accomplish this, I tried putting both, the toolbar, and the webview into a scrollview, but that did not work out because now the webview was incapable of scrolling.
I need some way of accomplishing that same effect that Safari manages to do, hiding the scrollbar on load and only making it visible once you come back to the top of the page.
The WebView is a scrollview, but what I need to accomplish is somehow integrate the top address bar, into that webview, so that way when I scroll down on a webpage, the bar disappears out of view with it.
To accomplish this, I tried putting both, the toolbar, and the webview into a scrollview, but that did not work out because now the webview was incapable of scrolling.
I need some way of accomplishing that same effect that Safari manages to do, hiding the scrollbar on load and only making it visible once you come back to the top of the page.
I mean that the webview actually subclasses a scrollview, you dont need to put the addressbar inside another scrollview along with the webview
you can put a timer for every 1 second that checks if the scrollview inside the webview object has scrolled past a certain point
its something like
Code:
for (id *sub in [yourwebview subviews])
{
NSLog(@"the layer is %@",sub);
}
this should find which one is the scrollview, then you can get its current scroll position, and the addressbar is actually a layer in your main view, where you run the above code.
dont quote me on the code above tho, im typing this on a pc