我从那里使用 Koloda 库https://github.com/Yalantis/Koloda
我已经根据我的需要修改了默认项目。这是我当前的屏幕图像。现在我想在卡片(kolodaView)拖动到交叉按钮时删除 UIView(kolodaView)。我知道如何删除卡片,但是当卡片和按钮匹配时我没有得到条件。这是我的代码
func kolodaPanFinished(_ koloda: KolodaView, card: DraggableCardView) {
if card.frame.intersects(leftButton.frame){
print("Frame of card",kolodaView.frame)
print("Frame of Button",leftButton.frame)
//dataSource.remove(at: tempIndex)
print("Deleted")
self.resetMe()
}
}