ResidentsViewController.swift
1.02 KB
//
// ResidentsViewController.swift
// InterQR-Internship
//
// Created by Дмитрий Тимофеев on 14.06.2022.
//
import UIKit
class ResidentsViewController: UIViewController {
var mainView = ResidentsView()
override func loadView() {
view = mainView
}
override func viewDidLoad() {
mainView.backButton.addTarget(self, action: #selector(didShowChooseApartVC), for: .touchUpInside)
mainView.addResidentsButton.addTarget(self, action: #selector(willShowAddResidentVC), for: .touchUpInside)
}
@objc func didShowChooseApartVC() {
navigationController?.popViewController(animated: true)
}
@objc func willShowAddResidentVC() {
// UIView.animate(withDuration: 0.5) {
// self.mainView.addResidentView.isHidden = false
// }
let vc = AddResidentsViewController()
vc.modalPresentationStyle = .overCurrentContext
vc.modalTransitionStyle = .crossDissolve
present(vc, animated: true)
}
}