Skip to content

Instantly share code, notes, and snippets.

View RaphBlanchet's full-sized avatar

Raphaël Blanchet RaphBlanchet

View GitHub Profile
@RaphBlanchet
RaphBlanchet / react-native-screens+3.25.0.patch
Created September 15, 2023 16:51
react-native-screens iOS Gestures
diff --git a/node_modules/react-native-screens/ios/RNSScreenStack.mm b/node_modules/react-native-screens/ios/RNSScreenStack.mm
index b06ffbd..f0b1858 100644
--- a/node_modules/react-native-screens/ios/RNSScreenStack.mm
+++ b/node_modules/react-native-screens/ios/RNSScreenStack.mm
@@ -896,6 +897,19 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer
BOOL isBackGesture = [panGestureRecognizer translationInView:panGestureRecognizer.view].x > 0 &&
_controller.viewControllers.count > 1;
+ // Detects if we are currently at the top of the ScrollView and if the gesture is a swipe down.
+ // We consider this only if the scroll is more vertical than horizontal
@RaphBlanchet
RaphBlanchet / react-native-vision-camera+2.15.5.patch
Created August 6, 2023 23:52
React Native Vision Camera x Reanimated v3 patch
diff --git a/node_modules/react-native-vision-camera/ios/Frame Processor/FrameProcessorRuntimeManager.mm b/node_modules/react-native-vision-camera/ios/Frame Processor/FrameProcessorRuntimeManager.mm
index 3841b20..505f276 100644
--- a/node_modules/react-native-vision-camera/ios/Frame Processor/FrameProcessorRuntimeManager.mm
+++ b/node_modules/react-native-vision-camera/ios/Frame Processor/FrameProcessorRuntimeManager.mm
@@ -19,22 +19,6 @@
#import <React/RCTUIManager.h>
#import <ReactCommon/RCTTurboModuleManager.h>
-#ifndef VISION_CAMERA_DISABLE_FRAME_PROCESSORS
- #if __has_include(<RNReanimated/NativeReanimatedModule.h>)
@RaphBlanchet
RaphBlanchet / SkewedBackground.tsx
Created January 24, 2023 20:40
React-Native Skewed Background using react-native-svg
type Props = {
targetSize: [number, number];
color?: string;
angle?: number;
style?: ViewStyle;
};
const SkewedBackground: React.FC<Props> = ({
targetSize,
color: _color,
@RaphBlanchet
RaphBlanchet / index.tsx
Last active November 11, 2024 13:59
React-Native SectionList item layout calculations
/* -----------------------
* One thing that is not really sepcified in React-Native's documentation
* of SectionList is what should be provided in getItemLayout function.
* In fact, this function is called for **every** items in your list,
* including the sections' header and footer EVEN IF YOU DON'T PROVIDE
* ANY COMPONENTS FOR THESE ITEMS. This is really important, otherwise you
* would have an offset in your items layout and what's displayed!
* This doesn't apply to "ItemSeparatorComponent", however.
* ----------------------- */