Image animation (changing images) didnt' work on IOS
See original GitHub issueHi i try to animation image i have 2 images and i change it after 1 second in a loop but i don’t in ios frame change but image remain the same and in Android it works fine. Can any one help me? componentDidMount() {
setInterval(() => {
var imageIndex = this.state.imageIndex+1;
if (imageIndex >= animationImages.length) {
imageIndex = 0;
}
this.setState({imageIndex:imageIndex})
}, 1000);
}
above is how i run it in loop and below is how i change the image
<Image
style={styles.happyCatContainer}
source={animationImages[this.state.imageIndex]}/>
and this is how i declare images on top
const animationImages = [
require('./Resources/onboarding_messages/happyCat1.png'),
require('./Resources/onboarding_messages/happyCat2.png'),
]
this works in android but ios just frame updated image remain the same.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How to animate the change of image in an UIImageView?
Your code worked perfectly when going from one image to another. Do you know how to make it work with automatic animation of...
Read more >Fixed issues in Animate release - Adobe Support
We heard you! We've been working hard at fixing the issues you reported to us. Here's a list of issues we fixed in...
Read more >Convert live photos to video | Adobe
Introduced in 2015 with the iPhone 6S, Live Photos are animated pictures, ... as your mobile device has iOS 11, you can still...
Read more >Create a picture-in-picture effect in iMovie on Mac
Apply an effect to the picture-in-picture clip: Click the transition style pop-up menu and choose Dissolve, Zoom, or Swap. Choosing Swap makes the...
Read more >The animated graphic in my e-mail message doesn't work
When you receive an e-mail message that contains animated graphics, such as animated .gif files, only a static image appears.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The key was adding a “key”. 😃
<Image source={icon} key={icon} />
Now the image is reloading.
@charpeni tells me to close this issue. If you think it should still be opened let us know why.