【问题标题】:iOS: Trash Can Delete Button for UITableViewCell in SwiftiOS:Swift 中 UITableViewCell 的垃圾桶可以删除按钮
【发布时间】:2017-07-24 09:52:22
【问题描述】:

有没有办法在UITableViewUITableViewCell 向右滑动时将此图标添加到UITableViewRowAction,而不设置UITableViewRowAction 的背景的patternImage

即添加访问此图标:

,

进入以下代码:

func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {

    let delete = UITableViewRowAction(style: .destructive, title: "", handler: {})

}

【问题讨论】:

标签: ios swift uitableview tableview uitableviewrowaction


【解决方案1】:

目前无法实现,但在 iOS 11 中将可以实现。以下是实现这些自定义操作的教程:

https://developerslogblog.wordpress.com/2017/06/28/ios-11-swipe-leftright-in-uitableviewcell/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-09-21
    • 2015-11-29
    • 2015-09-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多