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:
- If it’s a tap, show/hide the
navbar and toolbar. - 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 =
. 3)
CGPointMake(0, (scrubber.y / [UIScreen mainScreen].bounds.size.height) *
scrollView.contentSize.height) - 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.