react native iPhone Plus text lines

心已入冬 提交于 2019-12-13 02:58:04

问题


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;


回答1:


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',


来源:https://stackoverflow.com/questions/48766927/react-native-iphone-plus-text-lines

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!