Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example to use UIWebView for RubyMotion.
class AppDelegate
def application(application, didFinishLaunchingWithOptions:launchOptions)
@window = UIWindow.alloc.initWithFrame UIScreen.mainScreen.bounds
@window.rootViewController = GoogleViewController.alloc.init
@window.makeKeyAndVisible
true
end
end
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
You can’t perform that action at this time.