Skip to content

Instantly share code, notes, and snippets.

@majak
majak / #8607.patch
Created September 27, 2016 16:33
ios view clipping issue #8607
diff --git a/node_modules/react-native/React/Views/RCTScrollView.m b/node_modules/react-native/React/Views/RCTScrollView.m
--- a/node_modules/react-native/React/Views/RCTScrollView.m
+++ b/node_modules/react-native/React/Views/RCTScrollView.m
@@ -136,7 +136,7 @@
* default UIKit behaviors such as textFields automatically scrolling
* scroll views that contain them and support sticky headers.
*/
-@interface RCTCustomScrollView : UIScrollView<UIGestureRecognizerDelegate>
+@interface RCTCustomScrollView : UIScrollView<UIGestureRecognizerDelegate, RCTClippingView>
- (void)reactSetFrame:(CGRect)frame
{
// If frame is zero, or below the threshold where the border radii can
// be rendered as a stretchable image, we'll need to re-render.
// TODO: detect up-front if re-rendering is necessary
CGSize oldSize = self.bounds.size;
[super reactSetFrame:frame];
if (!CGSizeEqualToSize(self.bounds.size, oldSize)) {
if (self.reactSubviews) {
BOOL aboveHasClipToBounds = self.clipsToBounds;