gpt4 book ai didi

ios - 如何调用 UIWebview 的委托(delegate)方法?

转载 作者:行者123 更新时间:2023-11-28 21:30:04 26 4
gpt4 key购买 nike

问题:

如何调用UIWebview的委托(delegate)方法

- (BOOL)webView:(UIWebView *)webView 
shouldStartLoadWithRequest:(NSURLRequest *)request
navigationType:(UIWebViewNavigationType)navigationType

请告诉我所有的触发器

最佳答案

如果您已将 UIWebView 设置为 IBOutlet,则可以在 viewDidLoad: 方法中执行此操作:

myWebView.delegate = self

然后,无论何时在 Web View 中发生任何事情,都会调用 View Controller 中的委托(delegate)方法。

关于ios - 如何调用 UIWebview 的委托(delegate)方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36469289/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com