开源软件名称:YFTableViewCell
开源软件地址:https://gitee.com/Dandre/YFTableViewCell
开源软件介绍:
YFTableViewCell for Objective-C And Swift - version 1.1![Build Status](https://travis-ci.org/DandreYang/YFTableViewCell-OC.svg?branch=master) ![Version](https://img.shields.io/cocoapods/v/YFTableViewCell-OC.svg?style=flat) ![License MIT](https://img.shields.io/badge/license-MIT-green.svg?style=flat) ![Platform](https://img.shields.io/cocoapods/p/YFTableViewCell-OC.svg?style=flat)
方便快捷地实现类似QQ的自定义侧滑删除效果,同时支持OC和Swift,集成简单快速,同时支持code和IB。
CocoaPodsObjective-C版本Swift版本pod 'YFTableViewCell-Swift' 优点:- 1.按钮支持文字、图标、文字+图标
- 2.支持任一自定义按钮(UIButton或其子类)
- 3.集成简单,继承于YFTableViewCell即可
- 4.同时支持code和IB创建cell
- 5.同时支持OC和Swift
演示![演示动画 演示动画](/Dandre/YFTableViewCell/raw/master/YFTableViewCell/YFTableViewCell.gif)
使用步骤:- 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
LicenseYFTableViewCell is released under the MIT license. See LICENSE for details. |
请发表评论