From 1497e42fc5a62ddca8609280387283cbf716fd82 Mon Sep 17 00:00:00 2001 From: Spencer Ahrens Date: Wed, 13 May 2015 09:24:29 -0700 Subject: [PATCH] [ReactNative] Properly support overflow: 'visible' on ScrollView Summary: We need to unset `clipsToBounds` on both the wrapper and the inner custom scroll view @public Test Plan: `overflow: 'visible'` actually shows content outside the `ScrollView` (e.g. for full-bleed horizontal scrollers/carousels). It doesn't pick up touches though, which is a wider issue. --- React/Views/RCTScrollView.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/React/Views/RCTScrollView.m b/React/Views/RCTScrollView.m index 1373d8bd1..d4a2ad5e9 100644 --- a/React/Views/RCTScrollView.m +++ b/React/Views/RCTScrollView.m @@ -294,6 +294,12 @@ CGFloat const ZINDEX_STICKY_HEADER = 50; _scrollView.stickyHeaderIndices = headerIndices; } +- (void)setClipsToBounds:(BOOL)clipsToBounds +{ + [super setClipsToBounds:clipsToBounds]; + [_scrollView setClipsToBounds:clipsToBounds]; +} + - (void)dealloc { _scrollView.delegate = nil;