AppDelegate.mファイルに次のコードがあり、アプリを開くとGoogleが開きます。Xcodeプロジェクトにコピーした.HTMLWebページを開くように変更しようとしていますが、機能しません。Xcode4.5.2を使用しています。
Googleを開くために機能するコードは次のとおりです。
@implementation MDAppDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com"]];
[self.webView.mainFrame loadRequest:request];
}
これをに変更してみました(プロジェクトフォルダーに置いたtest.htmlファイルが読み込まれるようになりましたが、アプリが空白になりました)。私は何が欠けていますか?
@implementation MDAppDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"test.html"]];
[self.webView.mainFrame loadRequest:request];
}