iOS开发 ----- 仿QQ实现滑动显示后边按钮

来源:互联网 发布:des算法加密过程 编辑:程序博客网 时间:2024/05/16 16:16

仿QQ实现滑动显示后边按钮

代码传送门

简介

滑动cell之后,会显示按钮,然后可以实现删除功能

这只是一个简单的工程,并不是一个框架或者库之类的

想使用的话,可以导入MyTableViewCell.m MyTableViewCell.h到工程中

然后遵守协议,实现自己的方法即可

默认有三个按钮,可以根据自己的需求增删

@protocol MyTableViewCellButtonDelegate <NSObject>@required-(void)cellClickSection:(NSInteger)section row:(NSInteger)row;@optional-(void)delButtonClickSection:(NSInteger)section row:(NSInteger)row;-(void)addButtonClickSection:(NSInteger)section row:(NSInteger)row;-(void)checkButtonClickSection:(NSInteger)section row:(NSInteger)row;@end

效果图

这里写图片描述

0 0