Mac アプリケーションの読み込み時に webView 内で URL を開くコードをいじっています。私の問題は、WebView *myWebView;
openAd.h ファイル内で を宣言する方法がわからないことです。
openAd.h
#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
@interface openAd : NSObject <NSApplicationDelegate>;
WebView *myWebView;
@end
openAd.m
#import "openAd.h"
@implementation openAd : NSObject ;
- (void)windowDidLoad
{
NSString *urlAddress = @"http://google.com";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[[myWebView mainFrame] loadRequest:requestObj];
}
@end
...ここからどこへ行くのかわかりません。