Skip to content

AnimatedImage is Animated While isAnimating Property is False #114

Open
@kevin-hv

Description

@kevin-hv

Steps to Reproduce:
Create a Bool State variable, with an initial value of false
Add an AnimatedImage to a View with the isAnimating property set to the State Bool which is false
Build the Application

Expected Result:
The animation is frozen

Actual Result:
The animation is running

OS Version:
13.4.1

Device:
iPhone SE (2nd generation) Simulator

Example Code:

struct ContentView: View {
    
    @State var isAnimating : Bool = false
    
    var body: some View {
        VStack{
            AnimatedImage(name: "elephant.png", isAnimating: $isAnimating)
                .scaledToFit()
            
            Toggle(isOn: $isAnimating){
                Text("Animating")
                .bold()
            }
        }.padding(50)
        
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions