mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-10 09:12:46 +08:00
[WebView] Exposed scalesPageToFit UIWebView property
Summary: Added the ``scalesPageToFit`` prop to ``WebView``. This allows ``UIWebView`` to handle user zoom and scale. Closes https://github.com/facebook/react-native/pull/1631 Github Author: alvaromb <amedina@apsl.net> Test Plan: Imported from GitHub, without a `Test Plan:` line.
This commit is contained in:
@@ -43,6 +43,7 @@ var WebViewExample = React.createClass({
|
||||
backButtonEnabled: false,
|
||||
forwardButtonEnabled: false,
|
||||
loading: true,
|
||||
scalesPageToFit: true,
|
||||
};
|
||||
},
|
||||
|
||||
@@ -97,6 +98,7 @@ var WebViewExample = React.createClass({
|
||||
javaScriptEnabledAndroid={true}
|
||||
onNavigationStateChange={this.onNavigationStateChange}
|
||||
startInLoadingState={true}
|
||||
scalesPageToFit={this.state.scalesPageToFit}
|
||||
/>
|
||||
<View style={styles.statusBar}>
|
||||
<Text style={styles.statusBarText}>{this.state.status}</Text>
|
||||
@@ -124,6 +126,7 @@ var WebViewExample = React.createClass({
|
||||
url: navState.url,
|
||||
status: navState.title,
|
||||
loading: navState.loading,
|
||||
scalesPageToFit: true
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user