Просмотр исходного кода

fix: add @MainActor attribute to animation closure of custom transition

paul-han 1 год назад
Родитель
Сommit
9c9fc59276
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Sources/Image/ImageTransition.swift

+ 1 - 1
Sources/Image/ImageTransition.swift

@@ -56,7 +56,7 @@ public enum ImageTransition: Sendable {
     ///    - completion: A block called when the transition animation finishes.
     case custom(duration: TimeInterval,
                  options: UIView.AnimationOptions,
-              animations: (@Sendable (UIImageView, UIImage) -> Void)?,
+              animations: (@Sendable @MainActor (UIImageView, UIImage) -> Void)?,
               completion: (@Sendable (Bool) -> Void)?)
     
     var duration: TimeInterval {