Created
August 8, 2020 18:13
-
-
Save azamsharp/9727638f73703f01dee99fe26cc205a2 to your computer and use it in GitHub Desktop.
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
var body: some View { | |
HStack { | |
ForEach(1..<(max + 1), id: \.self) { index in | |
Image(systemName: "star") | |
.foregroundColor(Color.orange) | |
.onTapGesture { | |
self.rating = index | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment