/
index.ios.js
43 lines (36 loc) · 1 KB
/
index.ios.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
'use strict';
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
NavigatorIOS,
AlertIOS
//StatusBarIOS
} from 'react-native';
//StatusBarIOS.setStyle(StatusBarIOS.Style.lightContent);
import MediaListView from './media-list-view';
export default class iTunesBrowser extends Component {
render() {
return (
//initial route gets displayed when it is rendered for the first time
<NavigatorIOS
style={ styles.global.mainContainer }
barTintColor='#2A3744'
titleTextColor= '#EFEFEF'
tintColor='#EFEFEF'
initialRoute = {{
component: MediaListView,
title: 'iTunesBrowser',
rightButtonTitle: 'Search',
//callback function with an alert
onRightButtonPress: () => AlertIOS.alert(
'Search', 'You pressed the Search button!')
}}
/>
);
}
}
import styles from './styles';
AppRegistry.registerComponent('iTunesBrowser', () => iTunesBrowser);