Created
September 15, 2022 01:05
-
-
Save benlmyers/78da5b9486dbc06f22777211ef5224a4 to your computer and use it in GitHub Desktop.
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
// | |
// Global.swift | |
// MVVM-SwiftUI | |
// | |
// Created by Ben Myers on 9/14/22. | |
// | |
import SwiftUI | |
class Global: ObservableObject { | |
// MARK: - Wrapped Properties | |
/// The user's name. | |
@Published var userName: String = "Ben Myers" | |
// MARK: - Properties | |
var userIsGuest: Bool { | |
return userName == "Guest" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment