TermsViewController.swift 843 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() {
        mainView.backgroundColor = .white
        
        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)
    }
}