JLChen
2021-05-18 a869383e163a18cdedcf587383c1eca043129754
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//
//  Copyright © 2019年 dahua. All rights reserved.
//
 
import UIKit
 
class DHHotSpotViewController: DHBaseViewController {
 
    let imageView = UIImageView()
    let mainTipLabel = UILabel()
    let littleTipLabel = UILabel()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.title = "add_device_title".lc_T
        
        configureSubviews()
        configureConstraints()
        
    }
    
    private func configureConstraints() {
        imageView.snp.makeConstraints { (make) in
            make.top.left.right.equalTo(self.view)
            make.height.equalTo(self.view.snp.width).multipliedBy(0.66)
        }
        
        mainTipLabel.snp.makeConstraints { (make) in
            make.top.equalTo(imageView.snp_bottomMargin).offset(30)
            make.left.equalTo(imageView).offset(10)
            make.right.equalTo(imageView).offset(-10)
            make.height.greaterThanOrEqualTo(100)
        }
        
        littleTipLabel.snp.makeConstraints { (make) in
            make.bottom.equalTo(self.view).offset(-30)
            make.left.equalTo(imageView).offset(50)
            make.right.equalTo(imageView).offset(-50)
            make.height.greaterThanOrEqualTo(50)
        }
    }
    
    private func configureSubviews() {
        self.view.addSubview(imageView)
        self.view.addSubview(mainTipLabel)
        self.view.addSubview(littleTipLabel)
        
        imageView.image = UIImage(named: "adddevice_pic_serialnumber")
        
        mainTipLabel.numberOfLines = 5
        mainTipLabel.textAlignment = .center
        mainTipLabel.textColor = UIColor.dhcolor_c2()
        mainTipLabel.font = UIFont.dhFont_t1()
        mainTipLabel.text = "add_devices_tip_about_wifi_pwd".lc_T
        
        littleTipLabel.numberOfLines = 2
        littleTipLabel.font = UIFont.dhFont_t5()
        littleTipLabel.textAlignment = .center
        
        //SMB不显示
        littleTipLabel.text = nil
//        littleTipLabel.dh_setAttributedTextColor(text: "add_devices_sc_hotspot_password_contact_tips".lc_T + DHModuleConfig.shareInstance().serviceCall(), length: "add_devices_sc_hotspot_password_contact_tips".lc_T.count, color1: UIColor.dhcolor_c5(), color2: UIColor.dhcolor_c0())
        
    }
 
}