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