[NavigatorIOS] Why NavigatorIOS overlaps upper part of inner component?
See original GitHub issueI’ve just generated empty React-Native project (using react-native init) and added sample NavigatorIOS code.
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
NavigatorIOS,
View,
} = React;
var TestProject = React.createClass({
render: function() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
</Text>
<Text style={styles.instructions}>
To get started, edit index.ios.js
</Text>
<Text style={styles.instructions}>
Press Cmd+R to reload,{'\n'}
Cmd+D or shake for dev menu
</Text>
</View>
);
}
});
var Test = React.createClass( {
render() {
return (
<NavigatorIOS
style={{flex:1}}
initialRoute={{
title: 'Preference',
component: TestProject
}}
/>
);
}
});
var styles = StyleSheet.create({
container: {
flex: 1,
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});
AppRegistry.registerComponent('TestProject', () => Test);

Issue Analytics
- State:
- Created 8 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
React Native - Navigation from inner components
In a React Native application, how can I perform navigation when touching in some component not directly tied up with the main Navigator...
Read more >Supporting safe areas | React Navigation
The area not overlapped by such items is referred to as "safe area". We try to apply proper insets on the UI elements...
Read more >NavigatorIOS - React Native Archive
A navigator is an object of navigation functions that a view can call. It is passed as a prop to any component rendered...
Read more >Communication between native and React Native
We maintain a hierarchy of components, in which each component depends only on its parent and its own internal state. We do this...
Read more >Component won't render within NavigatorIOS - React Native ...
I had the same issue. Turned out I had to add some margin to the top of the view inside the MyView component....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

FYI: For those coming across this issue, a more stable solution than setting paddingTop: 64 is turning off the translucent property.
This is default iOS behavior since iOS 7 when they made the Navigation Bar translucent. Content is supposed to be able to visually scroll beneath the nav bar.
Anyway, if you don’t need that functionality, just set
paddingTop: 64on your container style which will start everything beneath the nav bar.