Skip to content

Commit

Permalink
Fix build warnings with Xcode 13.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
tadija authored and JoeMatt committed Aug 29, 2022
1 parent e6d2341 commit c30a7a8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Sources/Debug Plugin/HeroDebugView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import UIKit

protocol HeroDebugViewDelegate: class {
protocol HeroDebugViewDelegate: AnyObject {
func onProcessSliderChanged(progress: Float)
func onPerspectiveChanged(translation: CGPoint, rotation: CGFloat, scale: CGFloat)
func on3D(wants3D: Bool)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Extensions/UIViewController+Hero.swift
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public extension HeroExtension where Base: UIViewController {
}
} else if let baseWindow = base.view.window, baseWindow.rootViewController == base {
hero.transition(from: base, to: next, in: baseWindow) { [weak base] finished in
guard let base = base, finished else { return }
guard base != nil, finished else { return }
baseWindow.rootViewController = next
}
}
Expand Down
6 changes: 3 additions & 3 deletions Sources/HeroTypes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@

import UIKit

public protocol HeroPreprocessor: class {
public protocol HeroPreprocessor: AnyObject {
var hero: HeroTransition! { get set }
func process(fromViews: [UIView], toViews: [UIView])
}

public protocol HeroAnimator: class {
public protocol HeroAnimator: AnyObject {
var hero: HeroTransition! { get set }
func canAnimate(view: UIView, appearing: Bool) -> Bool
func animate(fromViews: [UIView], toViews: [UIView]) -> TimeInterval
Expand All @@ -41,7 +41,7 @@ public protocol HeroAnimator: class {
func changeTarget(state: HeroTargetState, isDestination: Bool, to view: UIView)
}

public protocol HeroProgressUpdateObserver: class {
public protocol HeroProgressUpdateObserver: AnyObject {
func heroDidUpdateProgress(progress: Double)
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/Transition/HeroProgressRunner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#if canImport(UIKit)
import QuartzCore

protocol HeroProgressRunnerDelegate: class {
protocol HeroProgressRunnerDelegate: AnyObject {
func updateProgress(progress: Double)
func complete(finished: Bool)
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Transition/HeroTransition.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class Hero: NSObject {
public static var shared = HeroTransition()
}

public protocol HeroTransitionDelegate: class {
public protocol HeroTransitionDelegate: AnyObject {
func heroTransition(_ hero: HeroTransition, didUpdate state: HeroTransitionState)
func heroTransition(_ hero: HeroTransition, didUpdate progress: Double)
}
Expand Down

0 comments on commit c30a7a8

Please sign in to comment.