Last active
June 10, 2021 09:40
Pluraliser
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 | |
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