Browse Source

Update README.md

iou90 6 years ago
parent
commit
a3734ad6dd
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      README.md

+ 11
- 0
README.md View File

@@ -19,6 +19,13 @@ Cause of moving View.propTypes to ViewPropTypes in React Naitve 0.44 (https://gi
19 19
 ```javascript
20 20
 <AutoHeightWebView
21 21
     onHeightUpdated={height => console.log(height)},
22
+    /*
23
+    if set to false may cause some layout issues (width of container will be than width of screen) on android
24
+    if set to true may cause some layout issues (smaller font size) on ios
25
+    */
26
+    scalesPageToFit={Platform.OS === 'android' ? true : false}
27
+    // baseUrl not work in android 4.3 or below version
28
+    enableBaseUrl={true}
22 29
     // offset of rn webview margin 
23 30
     heightOffset={5}
24 31
     // default width is the width of screen
@@ -38,3 +45,7 @@ Cause of moving View.propTypes to ViewPropTypes in React Naitve 0.44 (https://gi
38 45
     // change script (have to change source to reload on android)
39 46
     customScript={`document.body.style.background = 'lightyellow';`} />
40 47
 ```
48
+
49
+# demo
50
+
51
+There could have some issues when installing & running the demo, related to https://github.com/facebook/react-native/issues/14209, you should try to delete the demo folder in node_modules/react-native-autoheight-webview of the demo project and npm start -- --reset-cache or restart your machine.