From dc13ceddadc30b143e668aadd69982bd8dc3d317 Mon Sep 17 00:00:00 2001
From: Shashank Kumawat <42731404+ShashankPunchh@users.noreply.github.com>
Date: Tue, 22 Oct 2019 17:13:59 +0530
Subject: [PATCH] ShashankKumawat-useWebKit-Update
As iOS is warning for UIWebView depreciation 'useWebKit' prop should be true. Style changes should be made for QRCode view as 'scalesPageToFit' doesn't work for iOS after using 'useWebKit' property.
---
lib/Canvas.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/Canvas.js b/lib/Canvas.js
index 3b1ab26..c431412 100644
--- a/lib/Canvas.js
+++ b/lib/Canvas.js
@@ -22,13 +22,19 @@ var Canvas = createReactClass({
render() {
var contextString = JSON.stringify(this.props.context);
var renderString = this.props.render.toString();
+ var qrCodeStyle =
+ Platform.OS === 'ios'
+ ? ' "}}
+ source={{html: qrCodeStyle +
+ "canvas{transform:translateZ(0);}"}}
opaque={false}
underlayColor={'transparent'}
style={this.props.style}