B4i Library iFCWebView - WKWebView Library without Designer

Discussion in 'iOS Libraries' started by Fabio Campanella, Sep 2, 2019.

  1. Fabio Campanella

    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.
     

    Attached Files:

    Erel likes this.
  2. Erel

    Erel Administrator Staff 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.
     
    Fabio Campanella likes this.
  3. Fabio Campanella

    Fabio Campanella 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)

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

    Thanks in advance.
     
  4. Erel

    Erel Administrator Staff 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.
     
  5. Fabio Campanella

    Fabio Campanella Member Licensed User

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

    Erel Administrator Staff Member Licensed User

    Yes.
     
  7. Fabio Campanella

    Fabio Campanella Member Licensed User

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

    Attached Files:

    Erel likes this.
  8. Erel

    Erel Administrator Staff Member Licensed User

    Thank you. I've uploaded it.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice