Created
June 5, 2019 14:56
-
-
Save rtking1993/50f433758c9bc43cb444bf7ad5d5c7c7 to your computer and use it in GitHub Desktop.
Animal model file for sample Safari Animals
This file contains 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
// 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