@@ -66,8 +66,8 @@ final class AnimatedImageHandler: ObservableObject {
6666 @Published var failureBlock : ( ( Error ) -> Void ) ?
6767 @Published var progressBlock : ( ( Int , Int ) -> Void ) ?
6868 // Coordinator Handler
69- @Published var viewCreateBlock : ( ( PlatformView , AnimatedImage . Context ) -> Void ) ?
70- @Published var viewUpdateBlock : ( ( PlatformView , AnimatedImage . Context ) -> Void ) ?
69+ @Published var viewCreateBlock : ( ( SDAnimatedImageView , AnimatedImage . Context ) -> Void ) ?
70+ @Published var viewUpdateBlock : ( ( SDAnimatedImageView , AnimatedImage . Context ) -> Void ) ?
7171}
7272
7373/// Layout Binding Object, supports dynamic @State changes
@@ -109,7 +109,7 @@ public struct AnimatedImage : PlatformViewRepresentable {
109109 /// A observed object to pass through the image manager loading status to indicator
110110 @ObservedObject var indicatorStatus = IndicatorStatus ( )
111111
112- static var viewDestroyBlock : ( ( PlatformView , Coordinator ) -> Void ) ?
112+ static var viewDestroyBlock : ( ( SDAnimatedImageView , Coordinator ) -> Void ) ?
113113
114114 /// A Binding to control the animation. You can bind external logic to control the animation status.
115115 /// True to start animation, false to stop animation.
@@ -770,23 +770,23 @@ extension AnimatedImage {
770770 /// Provide the action when view representable create the native view.
771771 /// - Parameter action: The action to perform. The first arg is the native view. The seconds arg is the context.
772772 /// - Returns: A view that triggers `action` when view representable create the native view.
773- public func onViewCreate( perform action: ( ( PlatformView , Context ) -> Void ) ? = nil ) -> AnimatedImage {
773+ public func onViewCreate( perform action: ( ( SDAnimatedImageView , Context ) -> Void ) ? = nil ) -> AnimatedImage {
774774 self . imageHandler. viewCreateBlock = action
775775 return self
776776 }
777777
778778 /// Provide the action when view representable update the native view.
779779 /// - Parameter action: The action to perform. The first arg is the native view. The seconds arg is the context.
780780 /// - Returns: A view that triggers `action` when view representable update the native view.
781- public func onViewUpdate( perform action: ( ( PlatformView , Context ) -> Void ) ? = nil ) -> AnimatedImage {
781+ public func onViewUpdate( perform action: ( ( SDAnimatedImageView , Context ) -> Void ) ? = nil ) -> AnimatedImage {
782782 self . imageHandler. viewUpdateBlock = action
783783 return self
784784 }
785785
786786 /// Provide the action when view representable destroy the native view
787787 /// - Parameter action: The action to perform. The first arg is the native view. The seconds arg is the coordinator (with userInfo).
788788 /// - Returns: A view that triggers `action` when view representable destroy the native view.
789- public static func onViewDestroy( perform action: ( ( PlatformView , Coordinator ) -> Void ) ? = nil ) {
789+ public static func onViewDestroy( perform action: ( ( SDAnimatedImageView , Coordinator ) -> Void ) ? = nil ) {
790790 self . viewDestroyBlock = action
791791 }
792792}
0 commit comments