Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone UIWebView从另一个类加载,委托方法放在哪里?_Iphone_Objective C_Delegates - Fatal编程技术网

Iphone UIWebView从另一个类加载,委托方法放在哪里?

Iphone UIWebView从另一个类加载,委托方法放在哪里?,iphone,objective-c,delegates,Iphone,Objective C,Delegates,我正在从另一个类加载UIWebView,效果非常好 但现在我需要知道如何实现这些委托方法: - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType // AND: - (void)alertView:(UIAlertView *)alertView clickedBut

我正在从另一个类加载
UIWebView
,效果非常好

但现在我需要知道如何实现这些委托方法:

- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
// AND:
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
我试着在另一节课上做,但没有成功。我还在将数据填充/加载到
UIWebView
的类中尝试了它,但也没有成功。我已经在
.h
-文件中设置了
UIWebView
-引用,一切都应该正常,但没有


任何帮助都将不胜感激。谢谢!:)

在“其他类”(也称为UIViewController)中创建UIWebView后,需要将UIWebView的委托设置为实现委托协议方法的对象。这通常是创建webView的控制器

查看示例项目文件
WebViewController.h | m
,以获取有关如何执行此操作的提示