소스 검색

Merge pull request #2300 from mlight3/mlight3/mainactor

fix: add @MainActor attribute to animation closure of custom transition
Wei Wang 1 년 전
부모
커밋
e72fedda15
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 {