Update the demo to use tooltip on macOS, showing the native view coordinate

This commit is contained in:
DreamPiggy 2019-12-02 20:13:23 +08:00
parent 16ce20bc19
commit 1582e80e41
1 changed files with 5 additions and 5 deletions

View File

@ -91,11 +91,11 @@ struct ContentView: View {
if self.animated {
#if os(macOS) || os(iOS) || os(tvOS)
AnimatedImage(url: URL(string:url))
/**
.onViewUpdate { view, context in
view.toolTip = "Mouseover Tip"
}
*/
.onViewUpdate { view, context in
#if os(macOS)
view.toolTip = url
#endif
}
.indicator(SDWebImageActivityIndicator.medium)
/**
.placeholder(UIImage(systemName: "photo"))