SettingsViewController.swift 877 Bytes
//
//  SettingsViewController.swift
//  InterQR-Internship
//
//  Created by Дмитрий Тимофеев on 08.06.2022.
//

import UIKit

class SettingsViewController: UIViewController {
    
    var mainView = SettingsView()
    
    override func loadView() {
        view = mainView
    }
    override func viewDidLoad() {
        mainView.backButton.addTarget(self, action: #selector(didShowHomeVC), for: .touchUpInside)
        mainView.logoutButton.addTarget(self, action: #selector(didLogoutAndShowVerificationVC), for: .touchUpInside)
    }
}

extension SettingsViewController {
    
    @objc func didShowHomeVC() {
        navigationController?.popViewController(animated: true)
    }
    
    @objc func didLogoutAndShowVerificationVC() {
        let vc = VerificationViewController()
        navigationController?.pushViewController(vc, animated: true)
    }
}