Skip to content

Instantly share code, notes, and snippets.

@masuidrive
Created March 30, 2013 13:57
Show Gist options
  • Save masuidrive/5276784 to your computer and use it in GitHub Desktop.
Save masuidrive/5276784 to your computer and use it in GitHub Desktop.
Proposal MobiRuby APIs
app.on(:resume) do
...
end
# app code
tableView = TableView.new
tableView.on(:select) do |v|
...
end
tableView.on(:cell) do |v, index|
cell = TableViewRow.new :text => "Row #{index}"
end
tableView.on(:numberOfRowsInSection) do |v|
5
end
viewController = ViewController.new :title => 'Menu', :style => plain
viewController.add tableView
navi = NavigationController.new
navi.push viewController, :animated => true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment