This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
wax /
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Wed Aug 26 16:10:06 -0700 2009 | |
| |
FAQ | Tue Nov 10 08:49:37 -0800 2009 | |
| |
LICENSE | Thu Oct 01 09:14:40 -0700 2009 | |
| |
README.md | Thu Oct 15 12:52:21 -0700 2009 | |
| |
examples/ | Tue Nov 10 08:49:37 -0800 2009 | |
| |
lib/ | Tue Dec 01 08:01:26 -0800 2009 | |
| |
rakefile | Thu Oct 15 17:34:44 -0700 2009 | |
| |
xcode-template/ | Tue Dec 01 16:24:38 -0800 2009 |
README.md
Setup
Download wax http://github.com/probablycorey/wax
From the inside the wax folder type rake install. This will install an xcode project template.
Open up xcode and create a new Wax project, it should be located under the User Tempates section.
Build and Run! You've got lua running on the iPhone!
Check MobileOrchard.com's Wax tutorial!
Example
Simple UITableViewController Example
waxClass{"BasicTableViewController", "UITableViewController", protocols = {"UITableViewDelegate", "UITableViewDataSource"}}
function init(self)
self.super:init()
self.states = {"Michigan", "California", "New York", "Illinois", "Minnesota", "Florida"}
return self
end
function viewDidLoad(self)
self:tableView():setDataSource(self)
self:tableView():setDelegate(self)
end
-- DataSource
-------------
function numberOfSectionsInTableView(self, tableView)
return 1
end
function tableView_numberOfRowsInSection(self, tableView, section)
return #self.states
end
function tableView_cellForRowAtIndexPath(self, tableView, indexPath)
local identifier = "BasicableViewCell"
local cell = tableView:dequeueReusableCellWithIdentifier(identifier)
cell = cell or UI.TableViewCell:initWithStyle_reuseIdentifier(UITableViewCellStyleDefault, identifier)
cell:setText(self.states[indexPath:row() + 1]) -- Must +1 because lua arrays are 1 based
return cell
end
-- Delegate
-----------
function tableView_didSelectRowAtIndexPath(self, tableView, indexPath)
self:tableView():deselectRowAtIndexPath_animated(indexPath, true)
-- Do something cool here!
end
Created By
Corey Johnson (probablycorey at gmail dot com)
More
- Found Bugs? - Issue tracking and release planning.
- Mailing List
- IRC: #wax on http://freenode.net







