Latest 0.0.2
Homepage https://github.com/cocomanbar/TMSwipeCell
License MIT
Platforms ios 8.0, requires ARC
Authors

微信样式,支持文字和图片样式按钮,支持删除再确认效果, 兼容代码和xib创建, 屏幕翻转.

效果图

image

pods

pod 'TMSwipeCell'

How to use

1.继承该类

@interface TMSwipeCell111 : TMSwipeCell
@end

2.在tableView:cellForRowAtIndexPath:方法中设置代理:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    TMSwipeCell111 *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass(TMSwipeCell111.class)];
    if (!cell) {
        cell = [[TMSwipeCell111 alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass(TMSwipeCell111.class)];
        cell.delegate = self;
    }
    return cell;
}

3.实现TMSwipeCellDelegate协议三个方法,返回侧滑按钮事件数组、返回需要事件的cell、以及代理处理事件(当然block也ok)。

4.更多细节请看demo

Latest podspec

{
    "name": "TMSwipeCell",
    "version": "0.0.2",
    "summary": "A WeChat-like sliding frame",
    "homepage": "https://github.com/cocomanbar/TMSwipeCell",
    "license": "MIT",
    "authors": {
        "cocomanbar": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/cocomanbar/TMSwipeCell.git",
        "tag": "0.0.2"
    },
    "source_files": "TMSwipeCell/SwipeCell/*",
    "requires_arc": true
}

Pin It on Pinterest

Share This