From fdd452b2a386d934ff9af5ab3d2d01b15d126aa7 Mon Sep 17 00:00:00 2001 From: Kazunori Takaishi Date: Tue, 8 Jun 2021 00:12:03 +0900 Subject: [PATCH] [Change] Replace Class-Only Protocol from class to AnyObject --- .../KolodaView/DraggableCardView/DraggableCardView.swift | 2 +- Pod/Classes/KolodaView/KolodaView.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Pod/Classes/KolodaView/DraggableCardView/DraggableCardView.swift b/Pod/Classes/KolodaView/DraggableCardView/DraggableCardView.swift index d31d700a..b15d4330 100644 --- a/Pod/Classes/KolodaView/DraggableCardView/DraggableCardView.swift +++ b/Pod/Classes/KolodaView/DraggableCardView/DraggableCardView.swift @@ -16,7 +16,7 @@ public enum DragSpeed: TimeInterval { case fast = 0.4 } -protocol DraggableCardDelegate: class { +protocol DraggableCardDelegate: AnyObject { func card(_ card: DraggableCardView, wasDraggedWithFinishPercentage percentage: CGFloat, inDirection direction: SwipeResultDirection) func card(_ card: DraggableCardView, wasSwipedIn direction: SwipeResultDirection) diff --git a/Pod/Classes/KolodaView/KolodaView.swift b/Pod/Classes/KolodaView/KolodaView.swift index 7fefd9ab..ddd027e5 100644 --- a/Pod/Classes/KolodaView/KolodaView.swift +++ b/Pod/Classes/KolodaView/KolodaView.swift @@ -28,7 +28,7 @@ public enum VisibleCardsDirection: Int { case top, bottom } -public protocol KolodaViewDataSource: class { +public protocol KolodaViewDataSource: AnyObject { func kolodaNumberOfCards(_ koloda: KolodaView) -> Int func kolodaSpeedThatCardShouldDrag(_ koloda: KolodaView) -> DragSpeed @@ -47,7 +47,7 @@ public extension KolodaViewDataSource { } } -public protocol KolodaViewDelegate: class { +public protocol KolodaViewDelegate: AnyObject { func koloda(_ koloda: KolodaView, allowedDirectionsForIndex index: Int) -> [SwipeResultDirection] func koloda(_ koloda: KolodaView, shouldSwipeCardAt index: Int, in direction: SwipeResultDirection) -> Bool