UIScrollView inside of UIScrollView?
Asked Answered
M

2

8

Similar questions have been asked to this, but my predicament is actually the opposite of theirs. I've got a fullscreen, paging UIScrollView, with each page being the size of the screen. Inside of that, I've got some pages that are themselves UIScrollViews, with their width greater than the screen width. The inner scrollviews are within a few layers of other UIViews, they are not direct subviews of the outer scrollview.

What I'd like is that, when I get to the end of one of the inner scrollviews, it starts scrolling the outer scrollview. From other questions I see on here, it looks like that should happen, but for some reason it doesn't. What in my setup could be causing this to stop happening? Where in the touch stack is the hand-off supposed to happen between inner and outer scrolling?

edit: Is there any way to pass touches or pan gesture commands out to the outer scroll view using I sense the inner view is past its bounds via scrollViewDidScroll delegate method?

Marlite answered 30/4, 2013 at 17:27 Comment(0)
B
1

You can call the super class touchesBegan delegate as follows


   - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
       [super touchesBegan:touches withEvent:event];
    }

Here is the reference link: How to pass the touch event to superview when userInteractionEnabled = YES?

Beetner answered 2/1, 2015 at 14:39 Comment(0)
P
0

WWDC 2013 Session 217 Exploring Scroll Views on iOS 7 explains in detail how to nest scroll views.

Pomology answered 7/8, 2015 at 0:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.