31 lines
660 B
Swift
31 lines
660 B
Swift
//
|
|
// OrderStatusBadgeView.swift
|
|
// suixinkan
|
|
//
|
|
|
|
import SnapKit
|
|
import UIKit
|
|
|
|
/// 订单状态标签,内部委托 `AppStatusBadge`。
|
|
final class OrderStatusBadgeView: UIView {
|
|
|
|
private let badge = AppStatusBadge()
|
|
|
|
override init(frame: CGRect) {
|
|
super.init(frame: frame)
|
|
addSubview(badge)
|
|
badge.snp.makeConstraints { make in
|
|
make.edges.equalToSuperview()
|
|
}
|
|
}
|
|
|
|
@available(*, unavailable)
|
|
required init?(coder: NSCoder) {
|
|
fatalError("init(coder:) has not been implemented")
|
|
}
|
|
|
|
func apply(status: Int, text: String) {
|
|
badge.applyOrderStatus(status, text: text)
|
|
}
|
|
}
|