iOS Question How to implement LoadDataWithBaseUrl B4A in B4i ?

JanPRO

Well-Known Member
Licensed User
Longtime User
B4X:
Sub LoadHTMLString(aWebView As WebView, HTML As String, BaseUrl As String)
    Dim SU As StringUtils
    BaseUrl = SU.EncodeUrl(BaseUrl,"UTF8")
   
    Dim NaObj As NativeObject = Me
    Dim NaObj2 As NativeObject = aWebView
    NaObj2.RunMethod("loadHTMLString:baseURL:",Array(HTML,NaObj.RunMethod("StringToURL:",Array(BaseUrl))))
End Sub
#if Objc
-(NSURL *)StringToURL:(NSString*)String{
    return [NSURL URLWithString:String];
}
#End If

;)
 
Upvote 0
Top