Skip to content

Instantly share code, notes, and snippets.

@rtking1993
Created June 5, 2019 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rtking1993/50f433758c9bc43cb444bf7ad5d5c7c7 to your computer and use it in GitHub Desktop.
Save rtking1993/50f433758c9bc43cb444bf7ad5d5c7c7 to your computer and use it in GitHub Desktop.
Animal model file for sample Safari Animals
// MARK: - Frameworks
import SwiftUI
// MARK: - Animal
struct Animal: Hashable, Identifiable {
// MARK: - Variables
var id: Int
var name: String
var description: String
var imageName: String
// MARK: - Dynamic Varaibles
var image: Image {
return Image(imageName)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment