Fix the compile issue of macOS
This commit is contained in:
parent
2587161069
commit
b62cbdf072
|
@ -129,6 +129,12 @@ public struct AnimatedImage : PlatformViewRepresentable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if os(macOS)
|
||||||
|
if self.isAnimating != view.wrapped.animates {
|
||||||
|
view.wrapped.animates = self.isAnimating
|
||||||
|
}
|
||||||
|
#else
|
||||||
if self.isAnimating != view.wrapped.isAnimating {
|
if self.isAnimating != view.wrapped.isAnimating {
|
||||||
if self.isAnimating {
|
if self.isAnimating {
|
||||||
view.wrapped.startAnimating()
|
view.wrapped.startAnimating()
|
||||||
|
@ -136,6 +142,7 @@ public struct AnimatedImage : PlatformViewRepresentable {
|
||||||
view.wrapped.stopAnimating()
|
view.wrapped.stopAnimating()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
configureView(view, context: context)
|
configureView(view, context: context)
|
||||||
layoutView(view, context: context)
|
layoutView(view, context: context)
|
||||||
|
|
Loading…
Reference in New Issue