swift - Multivalued Section and Trailing swipe
问题描述
I am unable to get trailing swipe working with MultivaluedSection. It works perfectly with Section.
internal func addSwipeAction(for row: ComponentTypeConditionRow) {
let copyAction = SwipeAction(
style: .normal,
title: nil,
handler: { [weak self] (action, row, completionHandler) in
completionHandler?(true)
})
let deleteAction = SwipeAction(
style: .destructive,
title: nil,
handler: { [self] (action, row, completionHandler) in
completionHandler?(true)
})
copyAction.image = UIImage(systemName: "square.on.square", withConfiguration: UIImage.SymbolConfiguration(weight: .regular))
copyAction.actionBackgroundColor = .systemBlue
deleteAction.image = UIImage(systemName: "trash", withConfiguration: UIImage.SymbolConfiguration(weight: .regular))
row.trailingSwipe.actions = [deleteAction,copyAction]
row.trailingSwipe.performsFirstActionWithFullSwipe = false
}
}
Do you have any idea?
Thanks
解决方案
推荐阅读
- image-loading - 有没有办法将带有注释的图像(标记图像)上传到自定义视觉?
- java - Spring中带有标准api的sql IIF函数
- c# - 如何将多个列分组并计数?
- javascript - three.js - 无法看透透明的合并几何
- java - 在 Android 上使用多版本 JAR 时是否存在限制/问题?
- azure - 为长时间运行的管道创建警报
- spring-boot - mockito 调用真实方法
- visual-studio - 使用 Microsoft Visual Studio 安装程序项目删除安装文件夹中的公司名称
- r - 如何为每个条形图添加标签?
- vue.js - 在页面级别更改 CSS 类