Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions PaystackInline.Forms.Plugin/Renderer.ios.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text;

using Foundation;
using Plugin.PaystackInline.Forms.Plugin;
using Plugin.PaystackInline.Forms.Plugin.iOS;
using UIKit;
using WebKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;

[assembly: ExportRenderer(typeof(PaystackWebView), typeof(PaystackWebViewRenderer))]
namespace Plugin.PaystackInline.Forms.Plugin.iOS
{

public class PaystackWebViewRenderer : ViewRenderer<PaystackWebView, WKWebView>, IWKScriptMessageHandler
{
const string PaymentJavaScriptFunction = "function invokeCSharpAction(data){window.webkit.messageHandlers.invokePayAction.postMessage(data);}";
Expand Down Expand Up @@ -76,10 +71,12 @@ public void DidReceiveScriptMessage(WKUserContentController userContentControlle
internal string LoadHtmlString()
{
var html = new StringBuilder();
html.Append("<meta name='viewport' content='width=device-width,initial-scale=1,maximum-scale=1' />");
html.AppendLine();
html.Append("<html>");
html.AppendLine();
string bodyStartTag = string.Format("<body style=\"height: {0}px \">", Element.WebViewHeight);
html.Append(bodyStartTag);
//string bodyStartTag = string.Format("<body style=\"height: {0}px \">", Element.WebViewHeight);
html.Append("<body>");
html.AppendLine();
html.Append("<form>");
html.AppendLine();
Expand Down
Loading