123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- //
- // SelectBusTypeViewController.swift
- // xingchuangke
- //
- // Created by Virgil on 2019/3/27.
- // Copyright © 2019 Virgil. All rights reserved.
- //
- import UIKit
- class SelectBusTypeViewController: BaseViewController {
- @IBOutlet weak var btnRight: UIButton!
- @IBOutlet weak var btnLeft: UIButton!
- var selectIndex = 0
- var shopOpen = ShopOpenEntity()
- override func viewDidLoad() {
- super.viewDidLoad()
- self.title = "选择商户类型"
- initNavLeftBackButton()
- shopOpen.shopType = 0
- //156 145
- btnRight.setSize(width: (ScreenWidth - 60)/2, height: (ScreenWidth - 60)/2 / 156 * 145)
- btnLeft.setSize(width: (ScreenWidth - 60)/2, height: (ScreenWidth - 60)/2 / 156 * 145)
- CommonViewUntils.setViewCenter(arrView: [btnLeft, btnRight], marginLeft: 20, marginRight: 20)
- //initNavRightButtonForTitle(title: "下一步", color: UIColor.white)
- imgViewSelect = UIImageView(frame: CGRect(x: 0, y: 0, width: 57, height: 54))
- imgViewSelect.image = UIImage(named: "ion_opening_merchants_14")
- btnLeft.addSubview(imgViewSelect)
- imgViewSelect.isHidden = true
- imgViewSelect.marginRight(right: 5)
- }
- override func btnRightMenuClick() {
- let vc = QuickOpenViewController()
- vc.shopOpen = self.shopOpen
- toViewController(viewController: vc)
- }
- var imgViewSelect: UIImageView!
- //btnAddTarget(view: self.view, selector: #selector(self.btnMenuClick))
- @IBAction func btnMenuClick(_ sender: AnyObject) {
- imgViewSelect.isHidden = false
- switch (sender as! UIButton).tag {
- case 1001: // 个人入网
- selectIndex = 0
- imgViewSelect.removeFromSuperview()
- btnLeft.addSubview(imgViewSelect)
- imgViewSelect.marginRight(right: 3)
- shopOpen.shopType = 0
- btnRightMenuClick()
- break
- case 1002: // 商户入网
- selectIndex = 1
- imgViewSelect.removeFromSuperview()
- btnRight.addSubview(imgViewSelect)
- imgViewSelect.marginRight(right: 3)
- shopOpen.shopType = 1
- btnRightMenuClick()
- break
- case 1003: //
- break
- case 1004: //
- break
- case 1005: //
- break
- case 1006: //
- break
- default:
- break
- }
- }
- override func viewWillAppear(_ animated: Bool) {
- super.viewWillAppear(animated)
- }
- override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
- super.init(nibName: "SelectBusTypeViewController", bundle: nil)
- }
- required init?(coder aDecoder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
- }
|