1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- //
- // InviteViewController.swift
- // xingchuangke
- //
- // Created by Virgil on 2019/3/23.
- // Copyright © 2019 Virgil. All rights reserved.
- //
- import UIKit
- class InviteViewControllerBack: BaseViewController {
- @IBOutlet weak var viewMenu1: UIView!
- @IBOutlet weak var viewMenu2: UIView!
- @IBOutlet weak var viewMenu3: UIView!
- @IBOutlet weak var viewBottomContent: UIView!
- @IBOutlet weak var viewBottom: UIView!
- @IBOutlet weak var imgShow: UIImageView!
- @IBOutlet weak var viewContent: UIView!
- var viewCode: ShareCodeView!
- override func viewDidLoad() {
- super.viewDidLoad()
- self.title = "邀请好友"
- let viewNav = (CommonViewUntils.getViewForXIB(xibName: "NavView") as! NavView)
- viewNav.initView(title: "邀请好友") {[weak self] (index, _) in
- if index == 0 {
- self!.handleBack()
- }
- }
- self.view.addSubview(viewNav)
- viewNav.marginTop(top: 0)
- viewContent.marginTop(top: -64, view: viewNav)
- imgShow.setSizeHeight(height: imgShow.width() / 1154 * 1249)
- viewBottomContent.setSizeHeight(height: imgShow.bottom() + 148)
- viewBottom.setSizeWidth(width: ScreenWidth)
- viewBottom.setCornerRadius(size: 8)
- viewMenu1.setSizeWidth(width: ScreenWidth / 2)
- viewMenu2.setSizeWidth(width: ScreenWidth / 2)
- viewMenu2.marginLeft(left: 0, view: viewMenu1)
- viewCode = (CommonViewUntils.getViewForXIB(xibName: "ShareCodeView") as! ShareCodeView)
- viewCode.initView()
- let image2 = CommonBarCodeTools.setupQRCodeImage("\(RequestURL.userRecCode)?recCode=\(CommonValue.getUserRecCode())", image: UIImage(named: "icon"))
- viewCode.imgView.image = image2
- }
- //btnAddTarget(view: self.view, selector: #selector(self.btnMenuClick))
- @IBAction func btnMenuClick(_ sender: AnyObject) {
- switch (sender as! UIButton).tag {
- case 1001: //
- CommonUMengShare.showSharedMenu(viewController: self, title: "立即注册,开启您的财富之旅", desc: "POS机办理,信用卡申请,积分换钱......", icon: UIImage(named: "icon")!, url: "\(RequestURL.userRecCode)?recCode=\(CommonValue.getUserRecCode())")
- break
- case 1002: //
- appDelegate.navController.showBackgroudView(viewContent: viewCode, isCenter: true)
- break
- case 1003: //
- break
- case 1004: //
- break
- case 1005: //
- break
- case 1006: //
- break
- default:
- break
- }
- }
- override func viewWillAppear(_ animated: Bool) {
- super.viewWillAppear(animated)
- setNavLineHidden(hidden: true)
- appDelegate.setNavigationBarHidden(isHidden: true)
- }
- override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
- super.init(nibName: "InviteViewControllerBack", bundle: nil)
- }
- required init?(coder aDecoder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
- }
|