MGSwipeTableCell的使用
MGSwipeTableCell的使用 侧滑UITableViewCell展示多个可操作按钮是iOS开发中常用到的一个功能。这里有个非常强大的开源库:MGSwipeTableCell,可以实现此功能。其效果如下图所示: 示意图.gif 引入工程 ■CocoaPods 引入 建议使用,没有使用过CocoaPods的童鞋可以参照大神唐巧的这篇文章 用CocoaPods做iOS程序的依赖管理 。 ■手动引入 下载地址 MGSwipeTableCell 。 使用 可以直接用MGSwipeTableCellcell,也可以继承于MGSwipeTableCell,下面是一个使用的例子: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString * reuseIdentifier = @"programmaticCell"; MGSwipeTableCell * cell = [self.tableView dequeueReusableCellWithIdentifier:reuseIdentifier]; if (!cell) { cell = [[MGSwipeTableCell alloc]