Last active
April 24, 2020 14:37
-
-
Save jobedylbas/10a1cf9bcfcf4e4b1d1a79f53dc1a5e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private func animate() { | |
var imageIndex: Int = 0 | |
Timer.scheduledTimer(withTimeInterval: 0.025, repeats: true) { timer in | |
if imageIndex < self.imageNames.count { | |
self.image = Image(self.imageNames[imageIndex]) | |
imageIndex += 1 | |
} | |
else { | |
timer.invalidate() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment