Answers for "foreach nsarray swiftui"

5

swiftui foreach

ForEach(1...5) { row in
    Text("Row (row)")
}
Posted by: Guest on March-04-2020
1

swiftui foreach with index

var body: some View {
        ForEach(array.indices) { i in
          Text("(self.array[i])")
            .onTapGesture { self.doSomething(index: i) }
        }
    }
Posted by: Guest on September-10-2021

Code answers related to "Swift"

Browse Popular Code Answers by Language