博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[React Native] Use the SafeAreaView Component in React Native for iPhone X Compatibility
阅读量:4964 次
发布时间:2019-06-12

本文共 1408 字,大约阅读时间需要 4 分钟。

In this lesson, you will learn how to use the SafeAreaView component to avoid the sensor cluster (the notch) and home activity indicator on the iPhone X.

 

SafeAreaView is similar to the View, just for iphone X, the screen is different from previous version. Using SafeAreaView can ensure all the content will be visible

 

import React from 'react';import {  View,  Text,  StyleSheet,  SafeAreaView,} from 'react-native';const App = () => (  
Nav bar
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer vitae diam consectetur nunc sollicitudin feugiat a sollicitudin velit. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus a dignissim orci. In commodo, velit ac hendrerit laoreet, mauris sapien mollis nulla, at convallis orci diam eu purus. Cras pharetra turpis ac massa laoreet, at consequat lorem pharetra. Pellentesque ac leo ut dui congue eleifend sed sed erat. Nunc at iaculis elit. Duis congue, odio sit amet rutrum imperdiet, quam arcu gravida leo, eu dapibus risus ex et ante. Fusce pellentesque interdum neque, a sodales lacus consequat id. Nunc faucibus lobortis blandit. Proin porttitor commodo pellentesque.
Tab bar
);

 

转载于:https://www.cnblogs.com/Answer1215/p/8272590.html

你可能感兴趣的文章
可以在浏览器中在线编辑office文件的扩展程序汇总
查看>>
程序员工资一般多少
查看>>
2018.4.22
查看>>
iOS开发之多媒体API(1)
查看>>
让iOS应用支持不同版本的系统与设备
查看>>
日期 function
查看>>
Java 连接池的工作原理
查看>>
poj1970 The Game(DFS)
查看>>
poj1040 Transportation(DFS)
查看>>
ubuntu16.04编译安装mysql5.7
查看>>
JavaScript面向对象之对象的声明、遍历和存储
查看>>
H5离线缓存
查看>>
python&数据分析&数据挖掘--参考资料推荐书籍
查看>>
NODE.JS学习的常见误区及四大名著
查看>>
求第区间第k大数 TLE归并树
查看>>
改Chrome的User Agent,移动版网络
查看>>
命令行java -classpath 的使用
查看>>
springboot+mybatis 用redis作二级缓存
查看>>
AVR 定时器快速PWM模式使用
查看>>
状态压缩 HDU4539 郑厂长系列故事——排兵布阵
查看>>