I'd like to have one big scrollview with horizontal scrolling enabled. Within this scrollView I'd like to have (let's say) 5 other scrollviews which can be scrolled vertical.
Can anyone point me in the right direction for how to handle the touchevents?
I'm thinking of making two gesturerecognizer (1 for tap and 1 for pan) and use the delta of the X and Y values for calculating a horizontal or vertical swipe. After I check the direction I set the big scroller or one of the scrollers to enable or disable. Is this the right approuch?
EDIT: Instead of using my method above I was just able to add my 5 scrollviews(vertical scrolling) in one big scrollview(horizontal) by adding the 5 scrollviews as a subview of the big one. Maybe this code can help someone out as well so provided example code as well.
for (int i = 0; i < NumberOfVerticalScrollers; i++) {
CGRect frame;
frame.origin.x = self.scrollView.frame.size.width * i;
frame.origin.y = 0;
frame.size = self.scrollView.frame.size;
UIScrollView *scroller = [[UIScrollView alloc] initWithFrame:frame];
scroller.directionalLockEnabled = YES;
scroller.contentSize = CGSizeMake(320, 960);
[self.scrollView addSubview:scroller];
}
self.scrollView.delegate = self;
self.scrollView.contentSize = CGSizeMake(self.scrollView.frame.size.width * NumberOfVerticalScrollers, self.scrollView.frame.size.height);