Skip to content

Instantly share code, notes, and snippets.

@DarrenHurst
Created March 8, 2023 02:00
Show Gist options
  • Save DarrenHurst/061f4b3829c54ae7fa080ffb59aa341d to your computer and use it in GitHub Desktop.
Save DarrenHurst/061f4b3829c54ae7fa080ffb59aa341d to your computer and use it in GitHub Desktop.
Just a easy Users for prototypes
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
}
@DarrenHurst
Copy link
Author

The power of protocols.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment