From bbb9e1356c94efb78cb2619795d3172a83f3480a Mon Sep 17 00:00:00 2001 From: kdxcxs Date: Wed, 2 Dec 2020 17:44:38 +0800 Subject: [PATCH] fix: apply paddingTop only for ios --- src/App.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.js b/src/App.js index e7fd977..f35e302 100644 --- a/src/App.js +++ b/src/App.js @@ -1,5 +1,5 @@ import React from 'react'; -import {StyleSheet, View} from 'react-native'; +import {StyleSheet, View, Platform} from 'react-native'; import {StatusBarHeight} from './api/StatusBarHeight'; import YooLogin from './component/YooLogin'; import {YooBackground} from './ui/YooBackground'; @@ -8,7 +8,7 @@ const styles = StyleSheet.create({ container: { margin: 0, padding: 0, - paddingTop: StatusBarHeight, + paddingTop: Platform.OS === 'ios' ? StatusBarHeight : 0, }, });