Quick tips (7 Part Series)
If you have page in
WKWebView in your app, you can modify it pretty freely. This can be useful for example when you are embedding your own page and want to provide different look/functionality when loaded in a web view.
WKWebView has method
This can be also very useful for getting information back about the page. For example you can ask for the total height and modify your app user interface accordingly.
Method looks like this:
completionHandler is not required but you can check for errors to verify everything works or use the
Any? to get result from JS code.
; or something like that when running the code in
WKWebView. Also it is a good idea to test the code on the page in browser by opening the developer console and pasting it here. It is much faster to debug than running your app and doing it via
Is anything not clear? Do you want more information? Ask in the comments and I will do my best to help you. Thanks for reading!