宽窄优行-由【嘉易行】项目成品而来
younger_times
2023-07-05 0d8f5fc8a516bfd07e425909e4a4432600572ee7
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
//
//  CarNumView.swift
//  OKProject
//
//  Created by alvin_y on 2020/6/3.
//  Copyright © 2020 yangwang. All rights reserved.
//
 
import UIKit
 
class CarNumView: UIView {
    
    /// 订单详情
    let didPressTrip = Delegate<Void, Void>()
    
    /// 内容
    @IBOutlet weak var label_content: UILabel!
    
    /// 获取Self
    /// - Returns: Self
    class func instance() -> CarNumView {
        let v = UINib(nibName: "CarNumView", bundle: nil).instantiate(withOwner: self, options: nil).first as! CarNumView
        v.label_content.textColor = UIColor.color(light: UIColor.color(hexString: "#4E576F"), dark: UIColor.color(hexString: "#FFFFFF"))
        return v
    }
    
    /// 按钮
    /// - Parameter sender: 按钮
    @IBAction func didPress(_ sender: UIButton) {
        if label_content.text?.contains("当前附近有") ?? false{
            return
        }
        self.didPressTrip.call()
    }
}