LaunchViewController.swift 1.37 KB
//
//  LaunchViewController.swift
//  Twear
//
//  Created by yangbin on 2021/12/29.
//

import UIKit

class LaunchViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = .white
        
        let imageView = UIImageView(frame: view.frame)
        imageView.image = UIImage(named: "launch_image")
        imageView.contentMode = .scaleAspectFit
        view.addSubview(imageView)
        
        let button = UIButton(frame: CGRect(x: SCREEN_WIDTH/2-64, y: SCREEN_HEIGHT-80, width: 128, height: 30))
        button.setColor(radio: 10, color: .white, borderColor: UIColor.rgbColorFromHex(0x77CDF0), textColor: .black, text: LocString("立即体验"))
        button.addTarget(self, action: #selector(gotoHomeVC), for: .touchUpInside)
        button.titleLabel?.font = RegularFont(15)
        view.addSubview(button)
    }
    
    @objc private func gotoHomeVC() {
        KeyWindow.rootViewController = ZCTabBarController()
        KeyWindow.makeKeyAndVisible()
    }
    
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}