B4i Library iFCWebView - WKWebView Library without Designer

Fabio Campanella

Member
Licensed User
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

Fabio Campanella

Member
Licensed 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

Administrator
Staff member
Licensed 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
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?
 
Top