Hi there I was wandering how to pass 2 String Arrays in ForEach loops the first one is Image(systemName: String), the second is name for that image. by example a button in a VStack with the image on top , under the Text(name). Thank for your help
Welcome to the forum. It would help if you showed your tentative code, not paraphrase it.
But, if I understand your question, you should use an array of a struct:
struct ImageModel: Identifiable {
let id = UUID()
var systemName: String
var realname: String
}
Then you have an array:
@State var images: [ImageModel] = [] // Populate it
Use it in ForEach:
ForEach($images) { $image in }