Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build warnings with Xcode 13.4.1 #740

Merged
merged 1 commit into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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