Created
May 7, 2012 10:18
-
-
Save chsh/2627056 to your computer and use it in GitHub Desktop.
Example to use UIWebView for RubyMotion.
This file contains 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
class AppDelegate | |
def application(application, didFinishLaunchingWithOptions:launchOptions) | |
@window = UIWindow.alloc.initWithFrame UIScreen.mainScreen.bounds | |
@window.rootViewController = GoogleViewController.alloc.init | |
@window.makeKeyAndVisible | |
true | |
end | |
end |
This file contains 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
class GoogleViewController < UIViewController | |
def viewDidLoad | |
self.view = UIWebView.alloc.init | |
url = NSURL.URLWithString("http://www.google.co.jp/") | |
request = NSURLRequest.requestWithURL(url) | |
self.view.loadRequest request | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment