MDCParallaxView
MDCParallaxView copied to clipboard
Collection View as background
First of all thank you for making this control. I am having an issue placing an UICollectionView as a background view. Everything loads fine, but the scrolling stops working after 1 scroll. If paging is enabled it allows me to scroll 1 page and if not then 1 swipe. Any suggestions?
I didn't want to dig too deeply into the problem, but what worked for me for now was this change:
-(UIView*)hitTest:(CGPoint)point withEvent:(UIEvent*)event { if (([self.backgroundView pointInside:point withEvent:event] && _backgroundInteractionEnabled)
|| [self.backgroundView.class isSubclassOfClass:[UIScrollView class]]){ CGFloat visibleBackgroundViewHeight = self.backgroundHeight - self.foregroundScrollView.contentOffset.y; if (point.y < visibleBackgroundViewHeight){ return self.backgroundView; } } return [super hitTest:point withEvent:event]; }