首页 > Web开发 > 详细

ReactNative学习-webView

时间:2016-07-05 18:53:16      阅读:221      评论:0      收藏:0      [点我收藏+]

在软件内部打开一个网页--不喜欢它没有办法返回,还需要再添加返回按钮==

import React from ‘react‘;
import {
    AppRegistry,
    Component,
    ScrollView,
    TouchableOpacity,
    Text,
    View,
    WebView
} from ‘react-native‘;

export default class WebViewView extends React.Component {
    render() {
        var url = this.props.stateParams;
        return (
            <WebView
                ref="webview"
                automaticallyAdjustContentInsets={false}
                style={{backgroundColor:‘rgba(255,255,255,0.8)‘, height:350}}
                source={{uri:url}}
                javaScriptEnabled={true}
                domStorageEnabled={true}
                decelerationRate="normal"
                startInLoadingState={true}
            />
        )
    }
}

 

ReactNative学习-webView

原文:http://www.cnblogs.com/maoyazhi/p/5644622.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!