在 iPhone X 模拟器上运行应用程序时,Material Top Tab Navigator 切入凹槽和底部按钮。
为了解决这个问题,我尝试在应用 App Container 之前实现 SafeAreaView,并将每个单独的屏幕包装在 SafeAreaViews 中。这可以使文本远离这些区域,而不是导航器。
import React, { Component } from 'react';
import { Text, View } from 'react-native';
import { createAppContainer, createMaterialTopTabNavigator, SafeAreaView } from 'react-navigation';
class Calculator extends Component {
render() {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text>Calculator!</Text>
</View>
);
}
}
class Camera extends Component {
render() {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text>Camera!</Text>
</View> …
Run Code Online (Sandbox Code Playgroud) My Flutter application built on both an Android and iOS device prior. However since implementing the camera plugin, the application will no longer build on the iOS device.
So far I have tried:
The code I'm running is just a default flutter application with a tab that contains the example code from https://pub.dartlang.org/packages/camera.
Flutter …