反应原生 iPhone Plus 文本行 [英] react native iPhone Plus text lines

查看:43
本文介绍了反应原生 iPhone Plus 文本行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应用中的所有多行文本标签上都有线条.线条仅在 iPhone Plus 上显示,而不在 iPad、标签页、Android 或任何其他设备上显示.

There are lines over all the multiline Text tags in the app.Lines only shows on iPhone Plus not on iPad, tab, android or any other device.

知道如何修复它吗?类似于下图的文本上的线条:

Any idea how to fix it? Lines over Text similar to the image below:

import React, {Component} from "react";
import {
  Image,
  View,
  StatusBar,
  TouchableOpacity,
  WebView,
  Dimensions,
  Linking,
  ScrollView,
  NetInfo,
  Alert
} from "react-native";
import {
  Container,
  Header,
  Title,
  Content,
  Text,
  H3,
  Button,
  Icon,
  Footer,
  FooterTab,
  Left,
  Right,
  Body
} from "native-base";

class Test extends Component {

  constructor() {
    super();
  }

  render() {
    return (
      <Container style={styles.container}>

<View>
<Text> test test test test test test </Text>
</View>

      </Container>
    );
  }
}

export default Test;

推荐答案

iPhone 7 Plus 在文本组件背景上显示线条,这也是 github 上已经报告的 react native 已知问题.要解决此问题,请添加以下样式:

iPhone 7 Plus show lines on text component background, this is react native known issue already reported on github as well. To resolve this add this in style:

 backgroundColor: 'transparent',

这篇关于反应原生 iPhone Plus 文本行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆