0
它保持抛出错误:接收器类型webFrame,例如消息是线上的前向声明“[[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlStr]]]] ;”Cocoa中的Webview无法加载
我.h文件中
@interface AttendanceWizardAppDelegate : NSObject <NSApplicationDelegate>
{
@private WebView *webView;
}
@property (weak) IBOutlet WebView *webView;
@property (assign) IBOutlet NSWindow *window;
@end
我.m文件
#import "AttendanceWizardAppDelegate.h"
@implementation AttendanceWizardAppDelegate
@synthesize Username = _Username;
@synthesize Password = _Password;
@synthesize webView = _webView;
@synthesize webber = _webber;
@synthesize window = _window;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
NSString *urlStr = @"www.google.com";
[[webView mainFrame ] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlStr]]];
}
@end
进口在那里。 – Kevrone 2011-12-28 15:42:52
编译时或运行时抛出错误吗? – Guillaume 2011-12-28 15:44:10
没关系我在我的Webkit.h中犯了一个错字 – Kevrone 2011-12-28 15:52:30