4 Star 7 Fork 0

Dandre Yang / YFTableViewCell

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

YFTableViewCell for Objective-C And Swift - version 1.1

Build Status Version License MIT Platform

方便快捷地实现类似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.

The MIT License (MIT) Copyright (c) 2015 saxue Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

支持TableViewCell滑动删除按钮 展开 收起
Objective-C 等 3 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Objective-C
1
https://gitee.com/Dandre/YFTableViewCell.git
git@gitee.com:Dandre/YFTableViewCell.git
Dandre
YFTableViewCell
YFTableViewCell
master

搜索帮助