TermsViewController.swift 792 Bytes
//
//  TermsViewController.swift
//  browser
//
//  Created by Artem Talko on 08.11.2023.
//

import UIKit

final class TermsViewController: UIViewController {
    private let mainView = TermsView()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        initViewController()
    }
    
    override func loadView() {
        view = mainView
    }
    
    private func initViewController() {
        addTargets()
    }
}


//MARK: Helper
extension TermsViewController {
    private func addTargets() {
        mainView.termsButton.addTarget(self, action: #selector(privacyButtonPressed), for: .touchUpInside)
    }
}

//MARK: Targets
extension TermsViewController {
    @objc
    private func privacyButtonPressed() {
        self.dismiss(animated: true)
    }
}