Created
March 8, 2023 02:00
-
-
Save DarrenHurst/061f4b3829c54ae7fa080ffb59aa341d to your computer and use it in GitHub Desktop.
Just a easy Users for prototypes
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
enum Users: String, Identifiable, CaseIterable, Equatable { | |
static var allCases: [Users] { | |
return [.snoopy, .charlie, .sally, .lucy] | |
} | |
var id: Self { | |
return self | |
} | |
case snoopy = "peanuts", //image name | |
charlie = "peanuts3", | |
sally = "peanuts1", | |
lucy = "peanuts2" | |
case all | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The power of protocols.