//
//  AV_AboutVC.swift
//  anniversary_Project
//
//  Created by 忆海16 on 2024/4/17.
//

import UIKit

class AV_AboutVC: AV_RootVC {

    @IBOutlet weak var imgv: UIImageView!
    override func viewDidLoad() {
        super.viewDidLoad()
        imgv.layer.cornerRadius = 10
        setNAVBack()
    }

    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        self.navigationController?.navigationBar.isHidden = false
        self.navigationItem.title = "About us"
    }
    
    func setNAVBack(){
       
        let backButton = UIButton(type: .custom)

        backButton.setBackgroundImage(#imageLiteral(resourceName: "back"), for: .normal)

 
        backButton.addTarget(self, action: #selector(back), for: .touchUpInside)

        let backView = UIBarButtonItem(customView: backButton)

        let barButtonItem = UIBarButtonItem(barButtonSystemItem: .fixedSpace, target: nil, action: nil)
        barButtonItem.width = -5

        navigationItem.leftBarButtonItems = [barButtonItem, backView]
    }
    
    @objc func back(){
        self.navigationController?.popViewController(animated: true)
    }

}
