Skip to content

Instantly share code, notes, and snippets.

@richardgill
Created March 23, 2016 10:51
Show Gist options
  • Save richardgill/25fd908503e77d966892 to your computer and use it in GitHub Desktop.
Save richardgill/25fd908503e77d966892 to your computer and use it in GitHub Desktop.
custom navigation animations
//in main app
configureScene(route, navigator) {
if (route.sceneConfig) {
return route.sceneConfig;
}
return CustomNavigatorSceneConfigs.HorizontalJump;
},
//customNavigatorSceneConfigs.js
import React from 'react-native'
import _ from 'lodash'
var {
Navigator,
} = React;
var customNavigatorSceneConfigs = {
//Horizontal swipe jump but without gesture stuff.
HorizontalJump: _.merge(_.clone(Navigator.SceneConfigs.HorizontalSwipeJump), {gestures: null}),
VerticalUpJump: _.merge(_.clone(Navigator.SceneConfigs.VerticalUpSwipeJump), {gestures: null})
}
export default customNavigatorSceneConfigs;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment