I'm experiencing a memory usage-based termination in my SwiftUI Apple Watch app. I've traced the problem down to a struct I've created called ImageCycler
.
ImageCycler
is a view that cycles through an array of images, displaying each one for 1.5 seconds before transitioning to the next. When it reaches the end, it starts back at the beginning. It's powered by the ImageCylerModel
. This is how you use it:
struct ImageCycler_Previews: PreviewProvider {
static var previews: some View {
ImageCycler(["Image1", "Image2", "Image3", "Image4"])
}
}