`NavigatorIOS` is a wrapper around [`UINavigationController`](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UINavigationController_Class/), enabling you to implement a navigation stack. It works exactly the same as it would on a native app using `UINavigationController`, providing the same animations and behavior from UIKit.
As the name implies, it is only available on iOS. Take a look at [`React Navigation`](https://reactnavigation.org/) for a cross-platform solution in JavaScript, or check out either of these components for native solutions: [native-navigation](http://airbnb.io/native-navigation/), [react-native-navigation](https://github.com/wix/react-native-navigation).
To set up the navigator, provide the `initialRoute` prop with a route object. A route object is used to describe each scene that your app navigates to. `initialRoute` represents the first route in your navigator.
In this code, the navigator renders the component specified in initialRoute, which in this case is `MyScene`. This component will receive a `route` prop and a `navigator` prop representing the navigator. The navigator's navigation bar will render the title for the current scene, "My Initial Scene".
To trigger navigation functionality such as pushing or popping a view, you have access to a `navigator` object. The object is passed in as a prop to any component that is rendered by `NavigatorIOS`. You can then call the relevant methods to perform the navigation action you need:
The code above adds a `_handleNavigationRequest` private method that is invoked from the `NavigatorIOS` component when the right navigation bar item is pressed. To get access to the navigator functionality, a reference to it is saved in the `ref` prop and later referenced to push a new scene into the navigation stack.
Props passed to `NavigatorIOS` will set the default configuration for the navigation bar. Props passed as properties to a route object will set the configuration for that route's navigation bar, overriding any props passed to the `NavigatorIOS` component.
The following parameters can be used to define a route:
*`**component**`: function
The React Class to render for this route.
*`**title**`: string
The title displayed in the navigation bar and the back button for this route.
*`**titleImage**`: [Image](docs/image.html)
If set, a title image will appear instead of the text title.
*`**passProps**`: object
Use this to specify additional props to pass to the rendered component. `NavigatorIOS` will automatically pass in `route` and `navigator` props to the comoponent.
*`**backButtonIcon**`: [Image](docs/image.html)
If set, the left navigation button image will be displayed using this source. Note that this doesn't apply to the header of the current view, but to those views that are subsequently pushed.
*`**backButtonTitle**`: string
If set, the left navigation button text will be set to this. Note that this doesn't apply to the left button of the current view, but to those views that are subsequently pushed.
*`**leftButtonIcon**`: [Image](docs/image.html)
If set, the left navigation button image will be displayed using this source.
*`**leftButtonTitle**`: string
If set, the left navigation button will display this text.
Styles for the navigation item containing the component.
*`**navigationBarHidden**`: boolean
Boolean value that indicates whether the navigation bar is hidden.
*`**shadowHidden**`: boolean
Boolean value that indicates whether to hide the 1px hairline shadow.
*`**tintColor**`: string
The color used for the buttons in the navigation bar.
*`**barTintColor**`: string
The background color of the navigation bar.
*`**barStyle**`: enum('default', 'black')
The style of the navigation bar. Supported values are 'default', 'black'. Use 'black' instead of setting `barTintColor` to black. This produces a navigation bar with the native iOS style with higher translucency.
*`**titleTextColor**`: string
The text color of the navigation bar title.
*`**translucent**`: boolean
Boolean value that indicates whether the navigation bar is translucent.
#### System Icons
Used in `leftButtonSystemIcon` and `rightButtonSystemIcon`. Supported icons are `done`, `cancel`, `edit`, `save`, `add`, `compose`, `reply`, `action`, `organize`, `bookmarks`, `search`, `refresh`, `stop`, `camera`, `trash`, `play`, `pause`, `rewind`, `fast-forward`, `undo`, `redo`, and `page-curl`.