iOS Question WKWebView1_PageFinished not firing

stevenindon

Active Member
Licensed User
Hello all,

I have put in WKWebView in the designer view (Event Name : WKWebView1) and when i load a Url,

Private Sub WKWebView1_PageFinished (Success As Boolean, Url As String)

did not fire event. Is there anything that i need to configure so that PageFinished will fire event?

*I have searched the forum for this and there is no clear indication what to set* Thought it should work by default...
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I have put in WKWebView in the designer view
Don't. Add the regular WebView.

No need to do anything special:
B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    WebView1.LoadUrl("https://www.google.com")
End Sub

Private Sub WebView1_PageFinished (Success As Boolean, Url As String)
    Log("finished")
End Sub
 
Upvote 0

stevenindon

Active Member
Licensed User
Hello all,

I have changed to Webview instead of using WKWebview as advised above. The funny thing is as follows :

Private Sub WebView1_PageFinished (Success As Boolean, Url As String) <<---- Event will ONLY be raised when i click a link INSIDE my html page.

but when i create a button in native and on click

WebView1.LoadUrl("http://myurl.com") <<----- this will not raise WebView1_PageFinished (Success As Boolean, Url As String)

Question, How can i raise this event for both ways?
 
Upvote 0
Top