Last active
June 10, 2021 09:40
-
-
Save atrinh0/3b5806100f257e1a09ec3b246b0a35be to your computer and use it in GitHub Desktop.
Pluraliser
This file contains 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 | |
struct ContentView: View { | |
let animals = ["bear", | |
"buffalo", | |
"cow", | |
"fish", | |
"fox", | |
"goose", | |
"ox", | |
"person", | |
"wolf", | |
"zebra"] | |
var body: some View { | |
NavigationView { | |
List(animals, id: \.self) { animal in | |
HStack { | |
Text("^[\(1) \(animal)](inflect: true)") | |
Spacer() | |
Text("^[\(2) \(animal)](inflect: true)") | |
} | |
} | |
.navigationTitle("Pluraliser") | |
} | |
} | |
} |
Author
atrinh0
commented
Jun 9, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment