diff --git a/examples/NavigationPlayground/js/App.js b/examples/NavigationPlayground/js/App.js index 774a30b..ac4cb79 100644 --- a/examples/NavigationPlayground/js/App.js +++ b/examples/NavigationPlayground/js/App.js @@ -1,7 +1,7 @@ /* @flow */ import React from 'react'; -import { Constants, ScreenOrientation } from 'expo'; +import { Asset, Constants, ScreenOrientation } from 'expo'; ScreenOrientation.allow(ScreenOrientation.Orientation.ALL); @@ -28,13 +28,14 @@ import StacksInTabs from './StacksInTabs'; import StacksOverTabs from './StacksOverTabs'; import StacksWithKeys from './StacksWithKeys'; import SimpleStack from './SimpleStack'; +import StackWithHeaderPreset from './StackWithHeaderPreset'; import SimpleTabs from './SimpleTabs'; import TabAnimations from './TabAnimations'; const ExampleInfo = { SimpleStack: { name: 'Stack Example', - description: 'A card stack!', + description: 'A card stack', }, SimpleTabs: { name: 'Tabs Example', @@ -44,6 +45,10 @@ const ExampleInfo = { name: 'Drawer Example', description: 'Android-style drawer navigation', }, + StackWithHeaderPreset: { + name: 'UIKit-style Header Transitions', + description: 'Masked back button and sliding header items. iOS only.', + }, // MultipleDrawer: { // name: 'Multiple Drawer Example', // description: 'Add any drawer you need', @@ -102,6 +107,7 @@ const ExampleRoutes = { // MultipleDrawer: { // screen: MultipleDrawer, // }, + StackWithHeaderPreset: StackWithHeaderPreset, TabsInDrawer: TabsInDrawer, CustomTabs: CustomTabs, CustomTransitioner: CustomTransitioner, @@ -128,6 +134,11 @@ class MainScreen extends React.Component { scrollY: new Animated.Value(0), }; + componentWillMount() { + Asset.fromModule(require('react-navigation/src/views/assets/back-icon-mask.png')).downloadAsync(); + Asset.fromModule(require('react-navigation/src/views/assets/back-icon.png')).downloadAsync(); + } + render() { const { navigation } = this.props; diff --git a/examples/NavigationPlayground/js/SimpleStack.js b/examples/NavigationPlayground/js/SimpleStack.js index 1717799..173066c 100644 --- a/examples/NavigationPlayground/js/SimpleStack.js +++ b/examples/NavigationPlayground/js/SimpleStack.js @@ -19,14 +19,12 @@ type MyNavScreenProps = { class MyBackButton extends React.Component { render() { - return ( -