开发者

Cannot adopt WebKit protocols

#import <开发者_JAVA技巧;WebKit/WebKit.h>

@interface MyClass : NSObject <WebFrameLoadDelegate> {
WebView *webView;
}

cannot find protocol declaration for 'WebFrameLoadDelegate'


WebFrameLoadDelegate is a informal protocol - it is declared as a category of NSObject. To use it you need to declare required methods in class interface and implement them.

When used to declare a protocol, a category interface doesn’t have a corresponding implementation. Instead, classes that implement the protocol declare the methods again in their own interface files and define them along with other methods in their implementation files.


Directly from Apple Developer Reference: https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/WebKit/Protocols/WebFrameLoadDelegate_Protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40003828

...However, depending on the content being loaded, some of the other methods defined in this protocol may be invoked multiple times. All the methods in this protocol are optional.

So the before answer is not correct in the sense of that it is not necessary to implement all the methods.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜