Skip to content

Instantly share code, notes, and snippets.

@probablycorey
Created July 6, 2009 03:16
Show Gist options
  • Select an option

  • Save probablycorey/141245 to your computer and use it in GitHub Desktop.

Select an option

Save probablycorey/141245 to your computer and use it in GitHub Desktop.
class("SimpleTableViewController", "UITableViewController")
function tableView_numberOfSectionsInTableView(tableView, section)
return 1
end
function tableView_numberOfRowsInSection(tableView, section)
return 1
end
function tableView_cellForRowAtIndexPath(tableView, indexPath)
local cell = UI.TableViewCell.initWithStyle_reuseIdentifier(0, "ACell")
cell.textLabel().setText("YEEEAHW")
return cell
end
-- In another File
tableViewController = SimpleTableViewController.initWithStyle(0)
window.addSubview(tableViewController.view())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment