diff --git a/iOSTestApp/iOSTestApp/ContentViewModel.swift b/iOSTestApp/iOSTestApp/ContentViewModel.swift index 2e95aff..ce3bc5e 100644 --- a/iOSTestApp/iOSTestApp/ContentViewModel.swift +++ b/iOSTestApp/iOSTestApp/ContentViewModel.swift @@ -13,8 +13,11 @@ class ContentViewModel: ObservableObject { @Published private var firstName = "" @Published var lastName = "" @Published var email = "" + @Published var elephantCount = 20 + @Published var contactVisible = 10 @Published var needToShowAlert = false @Published var errorText = "" + @Published var xv = 10 } @@ -30,3 +33,37 @@ extension ContentViewModel { } } + +extension ContentViewModel { + + func getContactVisibleCount() -> Int { + return contactVisible + } + + func getElephantCount() -> Int{ + return elephantCount + } + + struct UserData { + var firstName: String + var lastName: String + var email: String + var errorText: String + var xv: Int + } + + func saveUserData(_ userData: UserData) { + debugPrint(firstName) + debugPrint(lastName) + } + + func CheckForSwitch(date: String) { + switch date { + case "Hello": + break + default: + break + } + } + +}