私聊页面的自定义U
This commit is contained in:
@@ -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
|
||||
}()
|
||||
|
Reference in New Issue
Block a user