Skip to content

Instantly share code, notes, and snippets.

@bharathreddys77
bharathreddys77 / LoginController.swift
Created May 23, 2021 07:26
Controller which inputs username and password and trigger Api on click.
class LoginController:UIViewController {
private func loginUser() {
ServiceController().loginUser(request: LoginRequest(email: emailTF.text, password: passwordTF.text)) {[weak self] (result) in
self?.dismissProgressBar()
guard let self = self else { return }
switch result {
case .success(let response):
print("login success \(response)")
break