Fix watchOS demo compile issue
This commit is contained in:
parent
1d7efeccc4
commit
d18693909b
|
@ -48,6 +48,11 @@ struct ContentView2: View {
|
|||
Group {
|
||||
Text("\(animated ? "AnimatedImage" : "WebImage") - \((imageURLs[imageIndex] as NSString).lastPathComponent)")
|
||||
Spacer()
|
||||
#if os(watchOS)
|
||||
WebImage(url:URL(string: imageURLs[imageIndex]))
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fit)
|
||||
#else
|
||||
if self.animated {
|
||||
AnimatedImage(url:URL(string: imageURLs[imageIndex]))
|
||||
.resizable()
|
||||
|
@ -57,6 +62,7 @@ struct ContentView2: View {
|
|||
.resizable()
|
||||
.aspectRatio(contentMode: .fit)
|
||||
}
|
||||
#endif
|
||||
Spacer()
|
||||
Button("Next") {
|
||||
if imageIndex + 1 >= imageURLs.count {
|
||||
|
|
Loading…
Reference in New Issue