码迷,mamicode.com
首页 > 其他好文 > 详细

tableView左滑按钮

时间:2016-06-08 20:29:33      阅读:254      评论:0      收藏:0      [点我收藏+]

标签:

 

技术分享

- (nullable NSArray<UITableViewRowAction *> *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath NS_AVAILABLE_IOS(8_0) __TVOS_PROHIBITED; // supercedes -tableView:titleForDeleteConfirmationButtonForRowAtIndexPath: if return value is non-nil

此方法可自动以左滑时出现的按钮。

 

 iOS8.0以下调用-tableView:titleForDeleteConfirmationButtonForRowAtIndexPath:来设置删除按钮的文字,8.0以上当- (nullable NSArray<UITableViewRowAction *> *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath返回为空或不写时,也是调用-tableView:titleForDeleteConfirmationButtonForRowAtIndexPath:,但如果不空时,则不调用titlefor....而调用editActionFor....

 

tableView左滑按钮

标签:

原文地址:http://www.cnblogs.com/yintingting/p/5571163.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!