Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
UITableViewCell subclass for pretty cool cell with swipe initiated actions. Inspired by popular Mailbox App.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
images
lib
spec
.gitignore
.rspec
Gemfile
LICENSE.txt
README.md
Rakefile
swipe_action_cell.gemspec

README.md

SwipeActionCell

SwipeActionCell is custom UITableViewCell for RubyMotion projects, which can be controlled by left and right swipe gesture.

Some screenshots:

first

second

Installation

Add this line to your application's Gemfile:

gem 'swipe_action_cell'

And then execute:

$ bundle

Or install it yourself as:

$ gem install swipe_action_cell

Usage

  1. Create a subclass
  2. You should place subviews you need into swipeView, not contentView (cause this cell uses UIScrollView).
  3. You can set up leftSwipeColor and rightSwipeColor wherever you want (for example in 'tableView:cellForRowAtIndexPath:' in your delegate or in subclass). Default color is white.
  4. You can set up leftImage and leftImage to identify your actions. They will be shown when user starts swiping.
  5. You shold implement leftSwipeAction and/or rightSwipeAction and put there any logic you need. If method is not implemented swipe to its side become disabled.

Check the example.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Something went wrong with that request. Please try again.