Update the watchOS demo without the force-touch
This commit is contained in:
parent
a94221fba0
commit
69c6f008dc
|
@ -191,15 +191,16 @@ struct ContentView: View {
|
|||
}
|
||||
#endif
|
||||
#if os(watchOS)
|
||||
return contentView()
|
||||
.contextMenu {
|
||||
Button(action: { self.reloadCache() }) {
|
||||
Text("Reload")
|
||||
return NavigationView {
|
||||
contentView()
|
||||
.navigationTitle("WebImage")
|
||||
.toolbar {
|
||||
Button(action: { self.reloadCache() }) {
|
||||
Text("Reload")
|
||||
}
|
||||
}
|
||||
Button(action: { self.switchView() }) {
|
||||
Text("Switch")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -52,10 +52,8 @@ struct DetailView: View {
|
|||
#endif
|
||||
#if os(macOS) || os(watchOS)
|
||||
zoomView()
|
||||
.contextMenu {
|
||||
Button(isAnimating ? "Stop" : "Start") {
|
||||
self.isAnimating.toggle()
|
||||
}
|
||||
.onTapGesture {
|
||||
self.isAnimating.toggle()
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -622,8 +622,8 @@ Since SwiftUI is aimed to support all Apple platforms, our demo does this as wel
|
|||
|
||||
Demo Tips:
|
||||
|
||||
1. Use `Switch` (right-click on macOS/force press on watchOS) to switch between `WebImage` and `AnimatedImage`.
|
||||
2. Use `Reload` (right-click on macOS/force press on watchOS) to clear cache.
|
||||
1. Use `Switch` (right-click on macOS/tap on watchOS) to switch between `WebImage` and `AnimatedImage`.
|
||||
2. Use `Reload` (right-click on macOS/button on watchOS) to clear cache.
|
||||
3. Use `Swipe Left` (menu button on tvOS) to delete one image url from list.
|
||||
4. Pinch gesture (Digital Crown on watchOS, play button on tvOS) to zoom-in detail page image.
|
||||
5. Clear cache and go to detail page to see progressive loading.
|
||||
|
|
Loading…
Reference in New Issue