• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

YFTableViewCell: 支持TableViewCell滑动删除按钮

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

YFTableViewCell

开源软件地址:

https://gitee.com/Dandre/YFTableViewCell

开源软件介绍:

YFTableViewCell for Objective-C And Swift - version 1.1

Build StatusVersionLicense MITPlatform

方便快捷地实现类似QQ的自定义侧滑删除效果,同时支持OC和Swift,集成简单快速,同时支持code和IB。

CocoaPods

Objective-C版本

pod 'YFTableViewCell-OC'

Swift版本

pod 'YFTableViewCell-Swift'

优点:

  • 1.按钮支持文字、图标、文字+图标
  • 2.支持任一自定义按钮(UIButton或其子类)
  • 3.集成简单,继承于YFTableViewCell即可
  • 4.同时支持code和IB创建cell
  • 5.同时支持OC和Swift

演示

演示动画 演示动画

使用步骤:

  • 1.将你的tableViewCell继承于YFTableViewCell
  • 2.设置cell.delegate = self;
  • 3.设置cell.editButtonArray = array;(array为存有 __kindof UIButton 的数组)
  • 4.实现两个代理方法
    • OC
      - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath- (void)tableView:(UITableView *)tableView didClickedEditButtonAtButtonIndex:(NSInteger)buttonIndex atIndexPath:(NSIndexPath *)indexPath
    • Swift
      func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)func tableView(_ tableView: UITableView, didClickedEditButtonAt buttonIndex: Int, At IndexPath:IndexPath)

version 1.1 更新内容

  • 1.重构部分方法,使其兼容iOS11
  • 2.支持Swift

License

YFTableViewCell is released under the MIT license. See LICENSE for details.


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap