私聊页面的自定义U

This commit is contained in:
fengshuo
2024-03-01 14:22:06 +08:00
parent 678297f771
commit 41ad01515d
49 changed files with 1088 additions and 71 deletions

View File

@@ -9,6 +9,18 @@ import UIKit
class ChatNavView: BaseView {
var isLike:Bool? {
didSet {
self.likeBtn.isHidden = isLike ?? false
}
}
var name:String? {
didSet {
self.titleLb.text = name
}
}
override func loadSubViews() {
addSubview(backBtn)
addSubview(titleLb)
@@ -57,10 +69,11 @@ class ChatNavView: BaseView {
let button = UIButton(type: .custom)
button.setTitle("关注", for: .normal)
button.setTitleColor(ThemeColor(hexStr: "#FFDA24"), for: .normal)
button.titleLabel?.font = UIFont.systemFont(ofSize: 16, weight: .medium)
button.titleLabel?.font = UIFont.systemFont(ofSize: 12, weight: .medium)
button.layer.masksToBounds = true
button.layer.cornerRadius = 26
button.isEnabled = false
button.layer.cornerRadius = 11
button.layer.borderWidth = 0.5
button.layer.borderColor = ThemeColor(hexStr: "#FFDA24").cgColor
button.addTarget(self, action: #selector(likeClick), for: .touchUpInside)
return button
}()