用户可参考该文件的使用方式,手势捏合在2.x的使用方式中有支持:https://github.com/react-native-oh-library/react-native-harmony-gesture-handler/blob/sig/tester/src/tests/NewApiTest.tsx<TestCase itShould="toggle color on PINCH" initialState={false} arrange={({setState}) => { return ( <Example label="PINCH ME" size={250} createGesture={setBackgroundColor => { return Gesture.Pinch().onStart(() => { setState(true); setBackgroundColor(prev => prev === PALETTE.DARK_BLUE ? PALETTE.LIGHT_GREEN : PALETTE.DARK_BLUE, ); }); }} /> ); }} assert={({expect, state}) => { expect(state).to.be.true; }} />
用户可参考该文件的使用方式,手势捏合在2.x的使用方式中有支持:https://github.com/react-native-oh-library/react-native-harmony-gesture-handler/blob/sig/tester/src/tests/NewApiTest.tsx