Search code examples
xcodeuiwebviewuiscrollviewscrollbars

Scrollbar in UIScrollView and UIWebview


I've been searching for some time for an answer on this problem: How can I keep the scrollbars on my UIScrollView and UIWebview visible? So that the user knows he can scroll up or down. (like in firefox or any other browser so without touching the scrollvie first)

I read on some sites that it wasn't possible, so my other question would be: Is there a way to add a "scrollbar" to a scrollview or webview?

Thank you very much


Solution

  • Maybe you could use this: flashScrollIndicators

    It won't show the scrollbar all the time, but it just flashes when the view is loaded.

    Edited: Other solution:

    In your view didload, you make a scrollview of you webview like this: UIScrollview *scrollview = [webview.subviews objectAtindex:0];

    you have to set the delegate of the scrollview on self: scrollview.delegate= self

    in your .h file you add

    When you place in your .m file you can use: -(void)ScrollviewDidscroll:...

    (I don't know if it works when you have multiple scrollviews)