Sha256: ea35cd0438bd1cb619f114f44184f65bd8c01f4287c15384127cc727620efb70
Contents?: true
Size: 1.69 KB
Versions: 1
Compression:
Stored size: 1.69 KB
Contents
# MotionTable MotionTable is a RubyMotion gem for easily building table views in iOS. *RubyGems.org does not have the current version of this gem.* ## Installation Add this line to your application's Gemfile: gem 'motion-table', :git => 'git@github.com:clearsightstudio/motion-table.git' And then execute: $ bundle Or install it yourself as: $ gem install motion-table ## Please Note We only have GroupedTables implemented at this point. We will be adding functionality, but if you need something else, fork it, add it and submit a pull request. ## Usage Include MotionTable in your controller and handle UITableViews Easily ```ruby class MyController < UITableViewController include MotionTable::GroupedTable def viewDidLoad super self.title = "Settings" @grouped_table_view_data ||= [ { title: "Your Account", cells: [ { title: "Edit Profile", action: :edit_profile }, { title: "Log Out", action: :log_out }, ] }, { title: "My App", cells: [ { title: "About", action: :something_here }, { title: "Feedback", action: :something_here } ] } ] self.view = self.createTableViewFromData(@grouped_table_view_data) end def log_out # This will be called when the Log Out table cell is pressed end def edit_profile # Implement your edit_profile view here end end ``` [<img src="http://i.imgur.com/lCIU6.png">] ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Added some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
motion-table-0.1.1 | README.md |