Skip to content

Commit

Permalink
Merge pull request #471 from jolyot/replace-class-only-protocol
Browse files Browse the repository at this point in the history
[Change] Replace Class-Only Protocol from class to AnyObject
  • Loading branch information
dimazen authored Sep 7, 2021
2 parents 499f6b6 + fdd452b commit b1c4800
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions Pod/Classes/KolodaView/KolodaView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b1c4800

Please sign in to comment.