Skip to content

Commit

Permalink
Prevent retaining the cross dissolve transition view longer than needed
Browse files Browse the repository at this point in the history
  • Loading branch information
ejensen committed May 29, 2024
1 parent 206d1e5 commit 4131f39
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Sources/NukeExtensions/ImageViewExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,10 @@ extension ImageViewController {
transitionView.alpha = 0
imageView.alpha = 1
},
completion: { isCompleted in
if isCompleted {
completion: { [weak transitionView] isCompleted in
if isCompleted, let transitionView {
transitionView.removeFromSuperview()
transitionView.image = nil
}
}
)
Expand Down

0 comments on commit 4131f39

Please sign in to comment.