File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
SDWebImageSwiftUI/Classes Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -665,7 +665,7 @@ extension AnimatedImage {
665
665
extension AnimatedImage {
666
666
667
667
/// Provide the action when view representable create the native view.
668
- /// - Parameter action: The action to perform. The first arg is the native view.
668
+ /// - Parameter action: The action to perform. The first arg is the native view. The seconds arg is the context.
669
669
/// - Returns: A view that triggers `action` when view representable create the native view.
670
670
public func onViewCreate( perform action: ( ( PlatformView , PlatformViewRepresentableContext < AnimatedImage > ) -> Void ) ? = nil ) -> AnimatedImage {
671
671
var result = self
@@ -674,14 +674,17 @@ extension AnimatedImage {
674
674
}
675
675
676
676
/// Provide the action when view representable update the native view.
677
- /// - Parameter action: The action to perform. The first arg is the native view.
677
+ /// - Parameter action: The action to perform. The first arg is the native view. The seconds arg is the context.
678
678
/// - Returns: A view that triggers `action` when view representable update the native view.
679
679
public func onViewUpdate( perform action: ( ( PlatformView , PlatformViewRepresentableContext < AnimatedImage > ) -> Void ) ? = nil ) -> AnimatedImage {
680
680
var result = self
681
681
result. viewUpdateBlock = action
682
682
return result
683
683
}
684
684
685
+ /// Provide the action when view representable destroy the native view
686
+ /// - Parameter action: The action to perform. The first arg is the native view. The seconds arg is the coordinator (with userInfo).
687
+ /// - Returns: A view that triggers `action` when view representable destroy the native view.
685
688
public static func onViewDestroy( perform action: ( ( PlatformView , Coordinator ) -> Void ) ? = nil ) {
686
689
self . viewDestroyBlock = action
687
690
}
You can’t perform that action at this time.
0 commit comments