Skip to content

Commit 1582e80

Browse files
committed
Update the demo to use tooltip on macOS, showing the native view coordinate
1 parent 16ce20b commit 1582e80

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Example/SDWebImageSwiftUIDemo/ContentView.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ struct ContentView: View {
9191
if self.animated {
9292
#if os(macOS) || os(iOS) || os(tvOS)
9393
AnimatedImage(url: URL(string:url))
94-
/**
95-
.onViewUpdate { view, context in
96-
view.toolTip = "Mouseover Tip"
97-
}
98-
*/
94+
.onViewUpdate { view, context in
95+
#if os(macOS)
96+
view.toolTip = url
97+
#endif
98+
}
9999
.indicator(SDWebImageActivityIndicator.medium)
100100
/**
101101
.placeholder(UIImage(systemName: "photo"))

0 commit comments

Comments
 (0)