B4i Library iFCWebView - WKWebView Library without Designer

Good evening everybody!

Who needs to use WKWebView without the Designer, he can use the following library.

In this way you can use WKWebView as if it were UIWebView. Plus you can set the browser opacity and background color.

Moreover, in addition to the UIWebView there is the event that is called in the execution of the javascript (JSComplete)

Shortname to use in your code is WKWebView2

I hope I have done something pleasant.

The zip file contains the xml file to be copied to the b4i installation and the .h and .a files to be put in the MACBuilder.
 

Attachments

  • iWKWebView.zip
    49.1 KB · Views: 21

Fabio Campanella

Member
Licensed User
Longtime User
Note that you can always create a layout with a single WKWebView (from iUI8 library) and load it whenever you want to create a WKWebView.

Yes but (i think) if you use layout the events raise in main module and if you have multiple instance of this you have to manage this with tags. Without layout you can raise events in a class (in the same class that you create instance)

Ps. Please, can you load library in the hosted builder?

Thanks in advance.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Yes but (i think) if you use layout the events raise in main module and if you have multiple instance of this you have to manage this with tags. Without layout you can raise events in a class (in the same class that you create instance)
It is very simple. The events will be raised in the module that loaded the layout.

Ps. Please, can you load library in the hosted builder?
To avoid confusion, it is better if you change the library name to iFCWebView or iFCWKWebView. I will then upload it.
 

Fabio Campanella

Member
Licensed User
Longtime User
It is very simple. The events will be raised in the module that loaded the layout.


To avoid confusion, it is better if you change the library name to iFCWebView or iFCWKWebView. I will then upload it.

Ok, but can I keep the name "WKWebView2" for create instance?
 

Fabio Campanella

Member
Licensed User
Longtime User
Ok, I've renamed in iFCWebView. Zip attached... Thank you for your time.
 

Attachments

  • libiFCWebView.zip
    49.1 KB · Views: 21
Top