| | |
| | | class LoginTreatyVC: BaseVC { |
| | | @IBOutlet weak var view_menu: UIView! |
| | | @IBOutlet weak var view_content: UIView! |
| | | |
| | | var topIndex = 0 |
| | | |
| | | private(set) var pageMenu:SPPageMenu = { |
| | | let pageMenu = SPPageMenu(frame: .zero, trackerStyle: .line) |
| | | // 追踪线 |
| | |
| | | pageVC.scrollview.bounces = false |
| | | return pageVC |
| | | }() |
| | | private var clouse:((Bool)->Void)! |
| | | |
| | | override func viewWillAppear(_ animated: Bool) { |
| | | super.viewWillAppear(animated) |
| | | UIView.animate(withDuration: 0.5) { |
| | |
| | | override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | view.backgroundColor = UIColor.black.withAlphaComponent(0) |
| | | |
| | | DispatchQueue.main.asyncAfter(delay: 0.1) { |
| | | self.pageMenu.selectedItemIndex = self.topIndex |
| | | self.pageViewController.scroll(toPage: self.topIndex, animation: true) |
| | | } |
| | | } |
| | | |
| | | override func setUI() { |
| | | view_menu.addSubview(pageMenu) |
| | | pageMenu.delegate = self |
| | | pageMenu.snp.makeConstraints { make in |
| | | make.edges.equalToSuperview() |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | func clickHandle(_ clouse:@escaping (Bool)->Void){ |
| | | self.clouse = clouse |
| | | } |
| | | |
| | | @IBAction func rejectAction(_ sender: UIButton) { |
| | | dismiss(animated: true) |
| | | clouse(false) |
| | | } |
| | | |
| | | @IBAction func completeAction(_ sender: UIButton) { |
| | | dismiss(animated: true) |
| | | clouse(true) |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | func pageViewController(_ pageViewConteoller: FFPageViewController, controllerForPage page: Int) -> UIViewController { |
| | | return WebVC(url: "https://www.baidu.com") |
| | | |
| | | var agreementType:AgreementType = .none |
| | | if page == 0{ |
| | | agreementType = .user |
| | | }else{ |
| | | agreementType = .privacy |
| | | } |
| | | |
| | | return WebVC(type: agreementType) |
| | | } |
| | | } |