Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (22 sloc) 0.802 kb
//
// WebViewExampleAppDelegate.m
// WebViewExample
//
#import "WebViewExampleAppDelegate.h"
@implementation WebViewExampleAppDelegate
@synthesize window;
@synthesize webView;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
}
- (void)awakeFromNib {
WebPreferences *prefs = [webView preferences];
[prefs _setLocalStorageDatabasePath:@"~/Library/WebViewExample/LocalStorage"];
NSString *resourcesPath = [[NSBundle mainBundle] resourcePath];
NSString *htmlPath = [resourcesPath stringByAppendingString:@"/htdocs/640x480_naked.html"];
[[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:htmlPath]]];
[window setDelegate:self];
}
- (void)windowWillClose:(NSNotification *)aNotification {
[NSApp terminate:self];
}
@end
Jump to Line
Something went wrong with that request. Please try again.