No description, website, or topics provided.
Objective-C Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
MRSwipeCell
MRSwipeCellTests
MRSwipeTableViewCell.xcodeproj
.gitignore
LICENSE
MRSwipeTableViewCell.podspec
README.md
video.gif

README.md

MRSwipeTableViewCell

A UITableViewCell that allow swipe left to reveal a background view with parallax effect.

API Reference

Please refer to the header file [MRSwipeTableViewCell.h] for a complete overview of the capabilities of the class.

 Installation

Copy files MRSwipeTableViewCell.h and MRSwipeTableViewCell.m into your project.

Usage

  • Subclass MRSwipeTableViewCell;
  • Add forward view content to centerContentView property.
  • Add background view content to rightContentView property.
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {        
        // Content view
        [self.centerContentView addSubview:self.customFrontView];
        [self.rightContentView addSubview:self.customRightView];
    }

    return self;
}
  • Implement protocol MRSwipeTableViewCellProtocol.
@protocol MRSwipeTableViewCellProtocol <NSObject>

// Right view width.
- (float)rightWidth;

// Parallax width. Value must the beetween 0 and rightWidth:
- (float)rightParallaxWidth;

Delegation

MRSwipeTableViewCell has a set of delegate methods in order to track the user behaviors. Take a look at the header file to be aware of all the methods provided by MRSwipeTableViewCellDelegate.

@protocol MRSwipeCellDelegate <NSObject>
@optional
- (void)didShowRightView:(MRSwipeTableViewCell *)cell;
- (void)didHideRightView:(MRSwipeTableViewCell *)cell;
@end

Requirements

  • iOS >= 7.0
  • ARC

License

MRSwipeCellDelegate is available under the MIT license. See the LICENSE file for more info.