didFinishLoadForFrame 不起作用 [英] didFinishLoadForFrame doesn't work
本文介绍了didFinishLoadForFrame 不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个非常简单的 Mac 程序来加载网页.它可以正常工作并加载良好,但我无法运行事件!什么都没有记录!
I've created a very simple Mac program to load a web page. It works and loads it well but I can't run events! Nothing is logged!
#import "BenotaAppDelegate.h"
@implementation BenotaAppDelegate
@synthesize webViewIns;
@synthesize window;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
NSURL *url = [NSURL URLWithString:@"http://example.com"];
NSURLRequest *req = [NSURLRequest requestWithURL:url];
[[webViewIns mainFrame] loadRequest:req];
}
- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame {
NSLog(@"didFinishLoadForFrame");
}
@end
我不能使用委托权....
I can not use delegate right....
推荐答案
您需要将出口 frameLoadDelegate
从您的 webView 对象设置为一个类,该类包含一个方法 webView:didFinishLoadForFrame:代码>
You need to set outlet frameLoadDelegate
from your webView object to a class, that contains a method webView:didFinishLoadForFrame:
这篇关于didFinishLoadForFrame 不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文