//
//  PopoverViewController.swift
//  MobilePortal
//
//  Created by xiejiangbo on 2019/3/22.
//  Copyright © 2019 yin chen. All rights reserved.
//

import UIKit

class PopoverViewController: BaseViewController {

    var delegate: PopoverViewControllerDelegate!
    var dataSource:NSMutableArray!
    var popoverType:PopoverType = .ScanCodeTraceability
    var popoverTypeArray = NSMutableArray()
    var popoverTypeblock:passParameterBlock!
    
    lazy var myTableView: UITableView = {
        let myTableView = UITableView.init()
        self.view.addSubview(myTableView)
        myTableView.snp.makeConstraints { (make) in
            make.width.height.equalToSuperview()
            make.center.equalToSuperview()
        }
        if #available(iOS 11.0, *) {
            myTableView.contentInsetAdjustmentBehavior = .never
            myTableView.scrollIndicatorInsets = myTableView.contentInset
            //            myTableView.contentInset = UIEdgeInsetsMake(UIApplication.shared.statusBarFrame.size.height, 0, 0, 0)
            myTableView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0)
        }else{
            myTableView.contentInset = UIEdgeInsetsMake(-64, 0, 0, 0)
        }
        registerCell(myTableView, cell: PopoverTableViewCell.self)
        myTableView.backgroundColor = loginBg_Color
        setExtraCellLineHidden(tableView: myTableView)
        return myTableView
    }()
    
    override func viewDidLoad() {
        super.viewDidLoad()
//        initTitleBar()
        addInitTableView()
        // Do any additional setup after loading the view.
    }
  
    override func viewDidDisappear(_ animated: Bool) {
        super.viewDidDisappear(animated)
        
    }
    override func viewWillLayoutSubviews() {
//        self.myTableView.frame = self.view.bounds
    }


}
