Last active
February 5, 2021 21:30
-
-
Save somersbmatthews/20bb7f017033460d20ed470fd486f7c9 to your computer and use it in GitHub Desktop.
view model in swift #swift #ios #swiftui
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
import Foundation | |
final class UserModel: ObservableObject { | |
struct User: Identifiable { | |
var id = UUID() | |
var firstName: String | |
var lastName: String | |
var email: String | |
var degree: String | |
var speciality: String | |
var verified: Bool | |
} | |
// init() { | |
// var exampleUser = (userid: "1234", | |
// firstName: "keith ", | |
// lastName: "rhoades", | |
// email: "[email protected]", | |
// degree: "engineering", | |
// speciality: "consultant", | |
// verified: true) | |
// | |
@Published var user = [User( | |
firstName: "keith ", | |
lastName: "rhoades", | |
email: "[email protected]", | |
degree: "engineering", | |
speciality: "consultant", | |
verified: true | |
)] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment