Skip to content

Instantly share code, notes, and snippets.

View jobedylbas's full-sized avatar
🍰

Jobe Dylbas jobedylbas

🍰
  • Instituto de Pesquisas Eldorado
  • Porto Alegre - Brasil
  • X @AzarEhOJobe
View GitHub Profile
struct ContentView: View {
var imageNames: [String] = ["img_0", "img_1"]
var body: some View {
AnimatedImage(imageNames: imageNames)
}
}
struct AnimatedImage: View {
@State private var image: Image?
private let imageNames: [String]
var body: some View {
Group {
image?
.resizable()
.scaledToFit()
}.onAppear(perform: {
struct AnimatedImage: View {
@State private var image: Image?
private let imageNames: [String]
var body: some View {
image?
.resizable()
.scaledToFit()
}
}