【发布时间】:2011-12-28 14:26:49
【问题描述】:
它不断抛出错误:接收器类型 webFrame 例如消息是行上的前向声明“[[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlStr]]];”
我的 .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
【问题讨论】: