Commit e4b24b73 authored by David黄金龙's avatar David黄金龙

处理 专享icon的位置

parent a5f83945
...@@ -21,13 +21,26 @@ class YHActivityTitleItemView: UIView { ...@@ -21,13 +21,26 @@ class YHActivityTitleItemView: UIView {
lazy var nameLabel:UILabel = { // lazy var nameLabel:UILabel = {
let nameLabel = UILabel() // let nameLabel = UILabel()
nameLabel.textColor = UIColor.mainTextColor // nameLabel.textColor = UIColor.mainTextColor
nameLabel.textAlignment = .left // nameLabel.textAlignment = .left
nameLabel.font = UIFont.PFSC_B(ofSize:24) // nameLabel.font = UIFont.PFSC_B(ofSize:24)
nameLabel.text = "哈佛爸爸线下教育沙龙" // nameLabel.text = "哈佛爸爸线下教育沙龙哈佛爸爸线下教育沙龙"
return nameLabel // return nameLabel
// }()
private lazy var nameTextView : UITextView = {
let lable0 = UITextView()
lable0.textColor = UIColor.mainTextColor
lable0.textAlignment = .left
lable0.font = UIFont.PFSC_B(ofSize:24)
lable0.isScrollEnabled = false
lable0.isEditable = false
lable0.isSelectable = false
return lable0
}() }()
...@@ -83,20 +96,21 @@ class YHActivityTitleItemView: UIView { ...@@ -83,20 +96,21 @@ class YHActivityTitleItemView: UIView {
extension YHActivityTitleItemView { extension YHActivityTitleItemView {
func setupUI() { func setupUI() {
addSubview(nameLabel) // addSubview(nameLabel)
addSubview(nameTextView)
addSubview(timeStaticLable) addSubview(timeStaticLable)
addSubview(timeLable) addSubview(timeLable)
addSubview(addressStaticLable) addSubview(addressStaticLable)
addSubview(addressLable) addSubview(addressLable)
addSubview(navAddressLable) addSubview(navAddressLable)
nameLabel.snp.makeConstraints { make in nameTextView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview() make.top.left.right.equalToSuperview()
} }
timeStaticLable.snp.makeConstraints { make in timeStaticLable.snp.makeConstraints { make in
make.left.equalToSuperview() make.left.equalToSuperview()
make.top.equalTo(nameLabel.snp.bottom).offset(24) make.top.equalTo(nameTextView.snp.bottom).offset(24)
make.height.equalTo(20) make.height.equalTo(20)
make.width.equalTo(28) make.width.equalTo(28)
} }
...@@ -129,5 +143,12 @@ extension YHActivityTitleItemView { ...@@ -129,5 +143,12 @@ extension YHActivityTitleItemView {
make.bottom.equalToSuperview() make.bottom.equalToSuperview()
} }
nameTextView.attributed.text = """
\("哈佛爸爸线哈 ", .foreground(UIColor.mainTextColor), .font(UIFont.PFSC_B(ofSize:24)))\(.image(UIImage(named: "activity_vip_icon2")!,.custom(.offset(CGPoint(x: 0, y: -7)), size: .init(width: 44, height: 34))))
"""
} }
} }
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "v专享@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "v专享@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment