Commit 9e266f14 authored by David黄金龙's avatar David黄金龙

Merge branch '630-dev' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into 630-dev

* '630-dev' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  //  换背景
  //  我的名片
parents 514fd745 7619cfca
......@@ -19,7 +19,6 @@ class YHMyEducationCell: UITableViewCell {
self.editBtn.isHidden = !self.userModel.isCurrentUser
self.collegeLabel.textColor = UIColor.mainTextColor
self.detailLabel.textColor = UIColor.mainTextColor70
if !self.userModel.college.isEmpty {
self.collegeLabel.text = self.userModel.college
} else {
......@@ -30,14 +29,26 @@ class YHMyEducationCell: UITableViewCell {
}
}
var detail = self.userModel.major
var isFirst = true
if !detail.isEmpty {
isFirst = false
}
if !self.userModel.background.isEmpty {
self.detailLabel.text = self.userModel.background
if isFirst {
detail += self.userModel.background
} else {
detail += "·" + self.userModel.background
}
}
if !detail.isEmpty {
self.detailLabel.text = detail
} else {
self.detailLabel.text = ""
if self.userModel.isCurrentUser {
self.detailLabel.text = "填写专业 · 填写学位"
self.detailLabel.textColor = UIColor.mainTextColor30
}
}
......@@ -127,9 +138,6 @@ class YHMyEducationCell: UITableViewCell {
self.backgroundColor = .clear
self.contentView.backgroundColor = .clear
collegeLabel.text = "上海交通大学xxxx学院"
detailLabel.text = "宗教学宗教学宗教学宗教学 · 本科"
self.contentView.addSubview(self.cardView)
cardView.addSubview(self.titleLabel)
cardView.addSubview(self.collegeLabel)
......@@ -165,7 +173,6 @@ class YHMyEducationCell: UITableViewCell {
make.top.equalTo(self.titleLabel.snp.bottom).offset(12)
make.left.equalTo(16)
make.right.equalTo(-16)
make.height.greaterThanOrEqualTo(20)
}
detailLabel.snp.makeConstraints { make in
......
......@@ -254,7 +254,7 @@ extension YHMyInterestTopicCell: UICollectionViewDelegate, UICollectionViewDataS
func getwith(font: UIFont, height: CGFloat, string: String) -> CGSize {
let size = CGSize.init(width: CGFloat(MAXFLOAT), height: height)
let dic = [NSAttributedString.Key.font: font] // swift 4.2
var strSize = string.boundingRect(with: size, options: [.usesLineFragmentOrigin], attributes: dic, context:nil).size
let strSize = string.boundingRect(with: size, options: [.usesLineFragmentOrigin], attributes: dic, context:nil).size
return CGSizeMake(ceil(strSize.width), strSize.height)
}
}
......
......@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "Mask group@2x.png",
"filename" : "名片背景2@.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Mask group@3x.png",
"filename" : "名片背景3@.png",
"idiom" : "universal",
"scale" : "3x"
}
......
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