Last active
August 1, 2019 19:26
-
-
Save piyushdec/8c6884a3e9e09fe125ce2b3a6d79e0c7 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
class HomeViewController: UIViewController { | |
private let user: User | |
private let apiService: ApiService | |
private lazy var name = UILabel() | |
init(user: User, apiService: ApiService) { | |
self.user = user | |
self.apiService = apiService | |
super.init(nibName: nil, bundle: nil) | |
} | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
name.text = user.name | |
} | |
private func handleSignOutButtonTap() { | |
apiService.signout() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment