Let's say I've got this view hierarchy. Note this is very similar to the Twitter iPad app, so take a look at that as a reference.
Views on top: +--------------------+ | | | | | | | | | S1 | V1 | S1 | | | | | | | | | +--------------------+ Views beneath +--------------------+ | | | | | | | T1 | V | |------| | | B B | | +--------------------+
V1: An opaque view, a subview of scrollview S1.
S1: UIScrollView, filling up bounds of window, with transparent background. Only needs to scroll its contents horizontally. Note the rectangles either side of V1 are transparent. T1: A UITableView, underneath S1 (visible) B: A UIButton, underneath S1 (visible) V: The root view, with child views: T1, B, B, S1I would like to replicate behaviour similar to the Twitter iPad app, specifically:开发者_JAVA技巧
• If I horizontally drag anywhere in S1 (even the transparent areas) it scrolls horizontally.
• If I interact with T1 or tap B buttons, they behave normally
Note that the answer at UIScrollView like Twitter app for iPad is close, but does not handle drag scrolling in the transparent areas of the top scroll view (S1). This question is specifically about that problem.
you can try this instead
https://github.com/raweng/StackScrollView
this may help to solve ur problem !
it supports :
Orientation (both Landscape & Portrait)
Swipe Gestures
Bouncing Effect
精彩评论