Created
October 25, 2020 23:25
-
-
Save tyirvine/7ae7aa05ce1422ff9011447f27ff9bb2 to your computer and use it in GitHub Desktop.
For Each loops for SwiftUI!
This file contains hidden or 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
import SwiftUI | |
// Main View | |
struct ContentView: View { | |
var body: some View { | |
VStack(alignment: /*@START_MENU_TOKEN@*/ .center/*@END_MENU_TOKEN@*/, spacing: /*@START_MENU_TOKEN@*/nil/*@END_MENU_TOKEN@*/, content: { | |
ForEach(1 ..< 10) { _ in | |
Text("I love Turtles") | |
} | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment