Skip to main content
code formatting
Source Link
pkamb
  • 35.5k
  • 27
  • 174
  • 207

2021 solution if you use non zero based arrays avoid using enumerated:

ForEach(array.indices,id:\.self) { index in     VStack {   Text(array[index].name )   .customFont(name: "STC", style: .headline) .foregroundColor(Color.themeTitle)  }  .foregroundColor(Color.themeTitle)} } 

} }

2021 solution if you use non zero based arrays avoid using enumerated

ForEach(array.indices,id:\.self){ index in     VStack{   Text(array[index].name )   .customFont(name: "STC", style: .headline) .foregroundColor(Color.themeTitle) 

} }

2021 solution if you use non zero based arrays avoid using enumerated:

ForEach(array.indices,id:\.self) { index in VStack { Text(array[index].name) .customFont(name: "STC", style: .headline) .foregroundColor(Color.themeTitle)  }  } } 
Source Link

2021 solution if you use non zero based arrays avoid using enumerated

ForEach(array.indices,id:\.self){ index in VStack{ Text(array[index].name ) .customFont(name: "STC", style: .headline) .foregroundColor(Color.themeTitle) 

} }