简体   繁体   English

didFinishLoadForFrame不起作用

[英]didFinishLoadForFrame doesn't work

I've created a very simple Mac program to load a web page. 我创建了一个非常简单的Mac程序来加载网页。 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.... 我不能使用委托权。

You need to set outlet frameLoadDelegate from your webView object to a class, that contains a method webView:didFinishLoadForFrame: 您需要将webView对象的插座frameLoadDelegate设置为一个类,该类包含方法webView:didFinishLoadForFrame:

连接检查器

Just a note that my (iOS) app was rejected due: 请注意,我的(iOS)应用被拒绝是因为:

non-public API/s in your app: webView:didFinishLoadForFrame 应用中的非公开API:webView:didFinishLoadForFrame

You might want to reconsider your app, I definitely must find the 3rd party lib, which called that, and get rid of it. 您可能要重新考虑您的应用程序,我绝对必须找到调用它的3rd party库,并摆脱它。 "It wasn't me!" “不是我!” is not a valid excuse :) 不是有效的借口:)

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

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