Created
April 23, 2014 13:49
-
-
Save bomberstudios/11215874 to your computer and use it in GitHub Desktop.
Play 2048 inside Sketch.app, just because...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var URL = "http://gabrielecirulli.github.io/2048/" | |
var frame = NSMakeRect(0,0,340,480) | |
var webView = [[WebView alloc] initWithFrame:frame] | |
[[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:URL]]] | |
var mask = NSTitledWindowMask + NSClosableWindowMask + NSMiniaturizableWindowMask + NSResizableWindowMask + NSUtilityWindowMask; | |
var window = [[NSPanel alloc] initWithContentRect:frame styleMask:mask backing:NSBackingStoreBuffered defer:true]; | |
[[window contentView] addSubview:webView] | |
[window makeKeyAndOrderFront:nil] |
Hi Bomberstudios, could you please tell me if there is any way that i can use offline html files in webview?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
awesome