MDCParallaxView icon indicating copy to clipboard operation
MDCParallaxView copied to clipboard

Collection View as background

Open mburshteyn1 opened this issue 11 years ago • 1 comments

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?

mburshteyn1 avatar May 30 '13 15:05 mburshteyn1

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]; }

mburshteyn1 avatar May 31 '13 15:05 mburshteyn1