(Platform.OS === 'ios')
| 321 | |
| 322 | _onScroll(e) { |
| 323 | if (Platform.OS === 'ios') { |
| 324 | const offsetX = e.nativeEvent.contentOffset.x; |
| 325 | if (offsetX === 0 && !this.scrollOnMountCalled) { |
| 326 | this.scrollOnMountCalled = true; |
| 327 | } else { |
| 328 | this.props.onScroll(offsetX / this.state.containerWidth); |
| 329 | } |
| 330 | } else { |
| 331 | const { position, offset, } = e.nativeEvent; |
| 332 | this.props.onScroll(position + offset); |
| 333 | } |