我正在写一本书,我想更改向后滑动和向后滑动功能。我想保持滑动动画但是在刷卡时我想改变书的章节,所以我需要去自定义参考,而不是以前的路线。任何人都可以帮助我吗?
答案 0 :(得分:-1)
查看这些导航方法:
getCurrentRoutes() - returns the current list of routes
jumpBack() - Jump backward without unmounting the current scene
jumpForward() - Jump forward to the next scene in the route stack
jumpTo(route) - Transition to an existing scene without unmounting
push(route) - Navigate forward to a new scene, squashing any scenes that you could jumpForward to
pop() - Transition back and unmount the current scene
replace(route) - Replace the current scene with a new route
replaceAtIndex(route, index) - Replace a scene as specified by an index
replacePrevious(route) - Replace the previous scene
immediatelyResetRouteStack(routeStack) - Reset every scene with an array of routes
popToRoute(route) - Pop to a particular scene, as specified by its route. All scenes after it will be unmounted
popToTop() - Pop to the first scene in the stack, unmounting every other scene
你可以这样做:
this.refs.navigator.jumpTo(route)
所有方法都记录在案here。