Skip to content

Commit f10bfa7

Browse files
committed
Update the code documentation for AnimatedImage
1 parent 3579e7b commit f10bfa7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

SDWebImageSwiftUI/Classes/AnimatedImage.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ extension AnimatedImage {
665665
extension AnimatedImage {
666666

667667
/// 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.
669669
/// - Returns: A view that triggers `action` when view representable create the native view.
670670
public func onViewCreate(perform action: ((PlatformView, PlatformViewRepresentableContext<AnimatedImage>) -> Void)? = nil) -> AnimatedImage {
671671
var result = self
@@ -674,14 +674,17 @@ extension AnimatedImage {
674674
}
675675

676676
/// 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.
678678
/// - Returns: A view that triggers `action` when view representable update the native view.
679679
public func onViewUpdate(perform action: ((PlatformView, PlatformViewRepresentableContext<AnimatedImage>) -> Void)? = nil) -> AnimatedImage {
680680
var result = self
681681
result.viewUpdateBlock = action
682682
return result
683683
}
684684

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.
685688
public static func onViewDestroy(perform action: ((PlatformView, Coordinator) -> Void)? = nil) {
686689
self.viewDestroyBlock = action
687690
}

0 commit comments

Comments
 (0)