Custom Scrollbar for iPhone’s UIView (Making Long Scrolls Not Suck)

A general idea:

I grabbed the dropbox app (it is awesome) and played around with a bit. It looks like pdf viewing takes a bit from the photo app in that it conditionally displays a translucent navbar and toolbar on touches, in addition to supporting the scrollbar. I’m pretty sure what’s going on is that they have a custom view controller intercepting touches and reacting accordingly.

On a touch:

  1. If it’s a tap, show/hide the
    navbar and toolbar.
  2. If it’s on
    the scrubber, begin tracking the
    touch and scrolling the
    scrollview/webview (whatever they’re
    displaying with). I’m sure the
    scrolling is something simple like
    scrollView.contentOffset =
    CGPointMake(0, (scrubber.y / [UIScreen mainScreen].bounds.size.height) *
    scrollView.contentSize.height)
    . 3)
  3. Else, pass the touch on to the
    enclosed view.

There may be other hidden magic with PDF displaying (I’ve never done it in cocoa touch) but something tells me this is their basic process.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)