Skip to content

Instantly share code, notes, and snippets.

@richtaur
Created March 14, 2011 01:19
Show Gist options
  • Save richtaur/868627 to your computer and use it in GitHub Desktop.
Save richtaur/868627 to your computer and use it in GitHub Desktop.
// BEFORE:
#import "WebViewExampleAppDelegate.h"
@implementation WebViewExampleAppDelegate
@synthesize window;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
// Insert code here to initialize your application
}
@end
// AFTER:
#import "CompleteProjectAppDelegate.h"
@implementation CompleteProjectAppDelegate
@synthesize window;
@synthesize webView;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
}
- (void)awakeFromNib {
NSString *resourcesPath = [[NSBundle mainBundle] resourcePath];
NSString *htmlPath = [resourcesPath stringByAppendingString:@"/htdocs/index.html"];
[[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:htmlPath]]];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment