LaunchViewController.swift
1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// 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.
}
*/
}