Add the comments about how to use native view update helper
This commit is contained in:
parent
03982673ca
commit
04fc21a08c
|
@ -85,6 +85,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"
|
||||
}
|
||||
*/
|
||||
.indicator(SDWebImageActivityIndicator.medium)
|
||||
/**
|
||||
.placeholder(UIImage(systemName: "photo"))
|
||||
|
|
|
@ -133,6 +133,9 @@ var body: some View {
|
|||
// Bundle (not Asset Catalog)
|
||||
AnimatedImage(name: "animation1", isAnimating: $isAnimating)) // Animation control binding
|
||||
.maxBufferSize(.max)
|
||||
.onViewUpdate { view, context in // Advanced native view coordinate
|
||||
view.toolTip = "Mouseover Tip"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue