Skip to content

Commit 5da8244

Browse files
committed
WIP
1 parent 2fb3e33 commit 5da8244

File tree

7 files changed

+9
-0
lines changed

7 files changed

+9
-0
lines changed

Sources/Animation/Animation.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import UIKit
22

3+
@MainActor
34
public struct Animation {
45
static var defaultDuration: Double { 0.35 }
56

Sources/Animation/Linear.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@MainActor
12
extension Animation {
23
public static func linear(duration: Double) -> Self {
34
.init(duration: duration, curve: .linear)

Sources/Animator/Animator.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public typealias _Animator = Animator
3838
func addCompletion(_ completion: @escaping (UIViewAnimatingPosition) -> Void)
3939
}
4040

41+
@MainActor
4142
extension Animator where Self: UIViewImplicitlyAnimating {
4243
public func addAnimations(_ animation: @escaping () -> Void) {
4344
addAnimations?(animation)

Sources/Animator/AnimatorTransientView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import UIKit
99
/// view being animated, which helps compound mutating values across
1010
/// different defined transitions before actually submitting them
1111
/// to the animator. This helps ensure no jumpy behavior in animations occurs.
12+
@MainActor
1213
@dynamicMemberLookup
1314
public class AnimatorTransientView {
1415
/// Typealias for `AnimatorTransientViewProperties`.

Sources/Animator/AnimatorTransientViewProperties.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public struct AnimatorTransientViewProperties: Equatable {
1515
public var zPosition: CGFloat
1616
}
1717

18+
@MainActor
1819
extension AnimatorTransientViewProperties {
1920
static let `default` = Self(
2021
alpha: 1,

Sources/Animator/Transform.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public struct Transform: Equatable {
1414
}
1515
}
1616

17+
@MainActor
1718
extension OptionalWithDefault where Value == Transform {
1819
func assign(to uiView: UIView, force: Bool) {
1920
self.assign(force: force) {

Sources/RuntimeSwizzling/Swizzle.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import ObjectiveC
22

3+
@MainActor
34
public var swizzleLogs = false
45

6+
@MainActor
57
public func swizzle(_ type: AnyObject.Type, _ original: Selector, _ swizzled: Selector) {
68
guard !swizzlingHistory.contains(type, original, swizzled) else {
79
return
@@ -46,4 +48,5 @@ private struct SwizzlingHistory {
4648
}
4749
}
4850

51+
@MainActor
4952
private var swizzlingHistory = SwizzlingHistory()

0 commit comments

Comments
 (0)