Say I have this hierarchy of views. Please note that this is very similar to the Twitter iPad app, so take a look at this as a link.
Views on top:
+ -------------------- +
| | | |
| | | |
| S1 | V1 | S1 |
| | | |
| | | |
+ -------------------- +
Views beneath
+ -------------------- +
| | |
| | |
| T1 | V |
| ------ | |
| BB | |
+ -------------------- +
V1: opaque view, subtitle scrollview S1.
S1: UIScrollView, filling the borders of the window, with a transparent background. It is only necessary to scroll its contents horizontally. Note that the rectangles on both sides of V1 are transparent.
T1: UITableView, under S1 (visible)
B: UIButton, under S1 (visible)
V: Root view with child views: T1, B, B, S1
I would like to repeat the behavior similar to the Twitter iPad application, in particular:
• If I horizontally drag anywhere in S1 (even transparent areas), it scrolls horizontally.
• If I interact with the T1 or B buttons, they behave normally
Please note that the answer in UIScrollView, like the Twitter app for iPad , is close, but does not handle drag and drop scrolling in the transparent areas of the top scroll list (S1). This question specifically addresses this issue.
source share