简体   繁体   English

在iOS上,如何使用Swift语言覆盖UIWebview中的loadrequest函数

[英]On iOS , How to override the function loadrequest in UIWebview with Swift language

On iOS, How do I override the function loadrequest in UIWebview with Swift language? 在iOS上,如何使用Swift语言覆盖loadrequest中的UIWebview函数?

I want to use the UIWebview to load my own page, and I have defined my protocol such as polly://xxx?a=xx in the page. 我想使用UIWebview加载我自己的页面,并且已经在页面中定义了协议,例如polly://xxx?a=xx

I want to process the URL which start with polly://xxx until the UIWebview load the URL. 我要处理以polly://xxx开头的URL,直到UIWebview加载URL。 In iOS, we all know I should process in function should start load with request if I use the Object-C. 在iOS中,我们都知道如果使用Object-C,我应该在函数中进行处理,并应从请求开始加载。

But I don't know how to override the function loadrequest in UIWebview with Swift language. 但是我不知道如何用Swift语言覆盖loadrequest中的UIWebview函数。 Can someone tell me how to do (please provide code)? 有人可以告诉我该怎么做(请提供代码)吗?

因此,国内外都没有Programe-Master。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM