Commit 7464c0d2 authored by Steven杜宇's avatar Steven杜宇

// UI

parent 84160fec
...@@ -160,7 +160,6 @@ class YHConnectListCell: UITableViewCell { ...@@ -160,7 +160,6 @@ class YHConnectListCell: UITableViewCell {
self.contact = contact self.contact = contact
avatarImageView.sd_setImage(with: URL(string: contact.avatar), placeholderImage: UIImage(named: "")) avatarImageView.sd_setImage(with: URL(string: contact.avatar), placeholderImage: UIImage(named: ""))
nameLabel.text = contact.username nameLabel.text = contact.username
contact.bio = "啊放假啊两地分居阿拉法久啊失蜡法开机啊索拉卡飞机阿卡拉说法登记卡拉萨"
detailLabel.text = contact.bio detailLabel.text = contact.bio
var text1 = "" var text1 = ""
......
...@@ -12,7 +12,7 @@ class YHInterestTopicLayout: UICollectionViewFlowLayout { ...@@ -12,7 +12,7 @@ class YHInterestTopicLayout: UICollectionViewFlowLayout {
var dataSource: [String] = [] var dataSource: [String] = []
weak var layoutDelegate: UICollectionViewDelegateFlowLayout? weak var layoutDelegate: UICollectionViewDelegateFlowLayout?
var collectionViewWidth = KScreenWidth-16.0*4 var collectionViewWidth = KScreenWidth-20.0*2
override func prepare() { override func prepare() {
super.prepare() super.prepare()
self.minimumInteritemSpacing = 8.0 self.minimumInteritemSpacing = 8.0
......
...@@ -157,14 +157,14 @@ class YHMyEducationCell: UITableViewCell { ...@@ -157,14 +157,14 @@ class YHMyEducationCell: UITableViewCell {
} }
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
make.left.equalTo(16) make.left.equalTo(20)
make.top.equalTo(16) make.top.equalTo(24)
make.height.equalTo(24) make.height.equalTo(24)
} }
editBtn.snp.makeConstraints { make in editBtn.snp.makeConstraints { make in
make.width.height.equalTo(20) make.width.height.equalTo(20)
make.right.equalTo(-15) make.right.equalTo(-20)
make.centerY.equalTo(titleLabel) make.centerY.equalTo(titleLabel)
} }
...@@ -173,25 +173,25 @@ class YHMyEducationCell: UITableViewCell { ...@@ -173,25 +173,25 @@ class YHMyEducationCell: UITableViewCell {
make.height.equalTo(18) make.height.equalTo(18)
make.centerY.equalTo(self.titleLabel) make.centerY.equalTo(self.titleLabel)
make.left.equalTo(self.titleLabel.snp.right).offset(8) make.left.equalTo(self.titleLabel.snp.right).offset(8)
make.right.lessThanOrEqualTo(self.editBtn.snp.left).offset(-15) make.right.lessThanOrEqualTo(self.editBtn.snp.left).offset(-20)
} }
collegeLabel.snp.makeConstraints { make in collegeLabel.snp.makeConstraints { make in
make.top.equalTo(self.titleLabel.snp.bottom).offset(12) make.top.equalTo(self.titleLabel.snp.bottom).offset(16)
make.left.equalTo(16) make.left.equalTo(20)
make.right.equalTo(-16) make.right.equalTo(-20)
} }
detailLabel.snp.makeConstraints { make in detailLabel.snp.makeConstraints { make in
make.top.equalTo(self.collegeLabel.snp.bottom).offset(8) make.top.equalTo(self.collegeLabel.snp.bottom).offset(8)
make.left.equalTo(16) make.left.equalTo(20)
make.right.equalTo(-16) make.right.equalTo(-20)
make.bottom.equalTo(-16) make.bottom.equalTo(-24)
} }
lineView.snp.makeConstraints { make in lineView.snp.makeConstraints { make in
make.left.equalTo(16) make.left.equalTo(20)
make.right.equalTo(-16) make.right.equalTo(-20)
make.bottom.equalTo(0) make.bottom.equalTo(0)
make.height.equalTo(1) make.height.equalTo(1)
} }
......
...@@ -76,15 +76,15 @@ class YHMyInterestTopicCell: UITableViewCell { ...@@ -76,15 +76,15 @@ class YHMyInterestTopicCell: UITableViewCell {
self.collectionView.snp.remakeConstraints { make in self.collectionView.snp.remakeConstraints { make in
make.height.equalTo(height) make.height.equalTo(height)
make.left.equalTo(16) make.left.equalTo(20)
make.right.equalTo(-16) make.right.equalTo(-20)
make.bottom.equalTo(-16) make.bottom.equalTo(-24)
make.top.equalTo(self.titleLabel.snp.bottom).offset(12) make.top.equalTo(self.titleLabel.snp.bottom).offset(16)
} }
self.detailLabel.snp.remakeConstraints { make in self.detailLabel.snp.remakeConstraints { make in
make.left.equalTo(16) make.left.equalTo(20)
make.right.equalTo(-16) make.right.equalTo(-20)
make.top.equalTo(titleLabel.snp.bottom).offset(12) make.top.equalTo(titleLabel.snp.bottom).offset(16)
} }
self.setNeedsLayout() self.setNeedsLayout()
self.layoutIfNeeded() self.layoutIfNeeded()
...@@ -92,16 +92,16 @@ class YHMyInterestTopicCell: UITableViewCell { ...@@ -92,16 +92,16 @@ class YHMyInterestTopicCell: UITableViewCell {
} else { } else {
self.detailLabel.snp.remakeConstraints { make in self.detailLabel.snp.remakeConstraints { make in
make.left.equalTo(16) make.left.equalTo(20)
make.right.equalTo(-16) make.right.equalTo(-20)
make.bottom.equalTo(-16) make.bottom.equalTo(-24)
make.top.equalTo(titleLabel.snp.bottom).offset(12) make.top.equalTo(titleLabel.snp.bottom).offset(16)
} }
self.collectionView.snp.remakeConstraints { make in self.collectionView.snp.remakeConstraints { make in
make.height.equalTo(height) make.height.equalTo(height)
make.left.equalTo(16) make.left.equalTo(20)
make.right.equalTo(-16) make.right.equalTo(-20)
make.top.equalTo(self.titleLabel.snp.bottom).offset(12) make.top.equalTo(self.titleLabel.snp.bottom).offset(16)
} }
} }
self.setNeedsLayout() self.setNeedsLayout()
...@@ -139,7 +139,7 @@ class YHMyInterestTopicCell: UITableViewCell { ...@@ -139,7 +139,7 @@ class YHMyInterestTopicCell: UITableViewCell {
layout.scrollDirection = .vertical layout.scrollDirection = .vertical
layout.dataSource = self.topicArr layout.dataSource = self.topicArr
layout.layoutDelegate = self layout.layoutDelegate = self
layout.collectionViewWidth = KScreenWidth-16.0*4 layout.collectionViewWidth = KScreenWidth-20.0*2
return layout return layout
}() }()
...@@ -189,23 +189,23 @@ class YHMyInterestTopicCell: UITableViewCell { ...@@ -189,23 +189,23 @@ class YHMyInterestTopicCell: UITableViewCell {
} }
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
make.left.equalTo(16) make.left.equalTo(20)
make.top.equalTo(16) make.top.equalTo(24)
make.height.equalTo(24) make.height.equalTo(24)
} }
editBtn.snp.makeConstraints { make in editBtn.snp.makeConstraints { make in
make.width.height.equalTo(20) make.width.height.equalTo(20)
make.right.equalTo(-15) make.right.equalTo(-20)
make.centerY.equalTo(titleLabel) make.centerY.equalTo(titleLabel)
} }
collectionView.snp.makeConstraints { make in collectionView.snp.makeConstraints { make in
make.left.equalTo(16) make.left.equalTo(20)
make.right.equalTo(-16) make.right.equalTo(-20)
make.bottom.equalTo(-16) make.bottom.equalTo(-24)
make.height.equalTo(24) make.height.equalTo(24)
make.top.equalTo(titleLabel.snp.bottom).offset(12) make.top.equalTo(titleLabel.snp.bottom).offset(16)
} }
detailLabel.snp.makeConstraints { make in detailLabel.snp.makeConstraints { make in
......
...@@ -112,27 +112,27 @@ class YHMyIntroductionCell: UITableViewCell { ...@@ -112,27 +112,27 @@ class YHMyIntroductionCell: UITableViewCell {
} }
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
make.left.equalTo(16) make.left.equalTo(20)
make.top.equalTo(16) make.top.equalTo(24)
make.height.equalTo(24) make.height.equalTo(24)
} }
editBtn.snp.makeConstraints { make in editBtn.snp.makeConstraints { make in
make.width.height.equalTo(20) make.width.height.equalTo(20)
make.right.equalTo(-15) make.right.equalTo(-20)
make.centerY.equalTo(titleLabel) make.centerY.equalTo(titleLabel)
} }
detailLabel.snp.makeConstraints { make in detailLabel.snp.makeConstraints { make in
make.top.equalTo(self.titleLabel.snp.bottom).offset(12) make.top.equalTo(self.titleLabel.snp.bottom).offset(16)
make.left.equalTo(16) make.left.equalTo(20)
make.right.equalTo(-16) make.right.equalTo(-20)
make.bottom.equalTo(-16) make.bottom.equalTo(-24)
} }
lineView.snp.makeConstraints { make in lineView.snp.makeConstraints { make in
make.left.equalTo(16) make.left.equalTo(20)
make.right.equalTo(-16) make.right.equalTo(-20)
make.bottom.equalTo(0) make.bottom.equalTo(0)
make.height.equalTo(1) make.height.equalTo(1)
} }
......
...@@ -10,12 +10,12 @@ import UIKit ...@@ -10,12 +10,12 @@ import UIKit
class YHExperienceItemView: UIView { class YHExperienceItemView: UIView {
static let detailFont = UIFont.PFSC_R(ofSize: 14) static let detailFont = UIFont.PFSC_R(ofSize: 13)
lazy var titleLabel: UILabel = { lazy var titleLabel: UILabel = {
let label = UILabel() let label = UILabel()
label.textColor = UIColor.mainTextColor50 label.textColor = UIColor.mainTextColor50
label.textAlignment = .left label.textAlignment = .left
label.font = UIFont.PFSC_R(ofSize: 14) label.font = UIFont.PFSC_R(ofSize: 13)
return label return label
}() }()
...@@ -43,12 +43,12 @@ class YHExperienceItemView: UIView { ...@@ -43,12 +43,12 @@ class YHExperienceItemView: UIView {
self.addSubview(self.detailLabel) self.addSubview(self.detailLabel)
self.titleLabel.snp.makeConstraints { make in self.titleLabel.snp.makeConstraints { make in
make.left.equalTo(0) make.left.equalTo(0)
make.width.equalTo(56) make.width.equalTo(52)
make.height.equalTo(20) make.height.equalTo(20)
make.top.equalToSuperview() make.top.equalToSuperview()
} }
self.detailLabel.snp.makeConstraints { make in self.detailLabel.snp.makeConstraints { make in
make.left.equalTo(self.titleLabel.snp.right).offset(56) make.left.equalTo(self.titleLabel.snp.right).offset(12)
make.right.equalToSuperview() make.right.equalToSuperview()
make.top.bottom.equalToSuperview() make.top.bottom.equalToSuperview()
} }
...@@ -87,8 +87,8 @@ class YHMyWorkExperienceCell: UITableViewCell { ...@@ -87,8 +87,8 @@ class YHMyWorkExperienceCell: UITableViewCell {
var itemView1Height = 0.0 var itemView1Height = 0.0
var top1Margin = 0.0 var top1Margin = 0.0
if !text1.isEmpty { if !text1.isEmpty {
itemView1Height = self.getHeight(text: text1, font: YHExperienceItemView.detailFont, width: KScreenWidth-16.0*4-56.0*2) itemView1Height = self.getHeight(text: text1, font: YHExperienceItemView.detailFont, width: KScreenWidth-20.0*2-52-12)
top1Margin = 12 top1Margin = 16
} }
companyView.snp.updateConstraints { make in companyView.snp.updateConstraints { make in
make.height.equalTo(itemView1Height) make.height.equalTo(itemView1Height)
...@@ -112,8 +112,8 @@ class YHMyWorkExperienceCell: UITableViewCell { ...@@ -112,8 +112,8 @@ class YHMyWorkExperienceCell: UITableViewCell {
var itemView2Height = 0.0 var itemView2Height = 0.0
var top2Margin = 0.0 var top2Margin = 0.0
if !text2.isEmpty { if !text2.isEmpty {
itemView2Height = self.getHeight(text: text2, font: YHExperienceItemView.detailFont, width: KScreenWidth-16.0*4-56.0*2) itemView2Height = self.getHeight(text: text2, font: YHExperienceItemView.detailFont, width: KScreenWidth-20.0*2-52-12)
top2Margin = 14 top2Margin = 16
} }
professionView.snp.updateConstraints { make in professionView.snp.updateConstraints { make in
make.height.equalTo(itemView2Height) make.height.equalTo(itemView2Height)
...@@ -136,8 +136,8 @@ class YHMyWorkExperienceCell: UITableViewCell { ...@@ -136,8 +136,8 @@ class YHMyWorkExperienceCell: UITableViewCell {
var itemView3Height = 0.0 var itemView3Height = 0.0
var top3Margin = 0.0 var top3Margin = 0.0
if !text3.isEmpty { if !text3.isEmpty {
itemView3Height = self.getHeight(text: text3, font: YHExperienceItemView.detailFont, width: KScreenWidth-16.0*4-56.0*2) itemView3Height = self.getHeight(text: text3, font: YHExperienceItemView.detailFont, width: KScreenWidth-20.0*2-52-12)
top3Margin = 14 top3Margin = 16
} }
industryView.snp.updateConstraints { make in industryView.snp.updateConstraints { make in
make.height.equalTo(itemView3Height) make.height.equalTo(itemView3Height)
...@@ -248,14 +248,14 @@ class YHMyWorkExperienceCell: UITableViewCell { ...@@ -248,14 +248,14 @@ class YHMyWorkExperienceCell: UITableViewCell {
} }
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
make.left.equalTo(16) make.left.equalTo(20)
make.top.equalTo(16) make.top.equalTo(24)
make.height.equalTo(24) make.height.equalTo(24)
} }
editBtn.snp.makeConstraints { make in editBtn.snp.makeConstraints { make in
make.width.height.equalTo(20) make.width.height.equalTo(20)
make.right.equalTo(-15) make.right.equalTo(-20)
make.centerY.equalTo(titleLabel) make.centerY.equalTo(titleLabel)
} }
...@@ -264,34 +264,34 @@ class YHMyWorkExperienceCell: UITableViewCell { ...@@ -264,34 +264,34 @@ class YHMyWorkExperienceCell: UITableViewCell {
make.height.equalTo(18) make.height.equalTo(18)
make.centerY.equalTo(self.titleLabel) make.centerY.equalTo(self.titleLabel)
make.left.equalTo(self.titleLabel.snp.right).offset(8) make.left.equalTo(self.titleLabel.snp.right).offset(8)
make.right.lessThanOrEqualTo(self.editBtn.snp.left).offset(-15) make.right.lessThanOrEqualTo(self.editBtn.snp.left).offset(-20)
} }
companyView.snp.makeConstraints { make in companyView.snp.makeConstraints { make in
make.left.equalTo(16) make.left.equalTo(20)
make.right.equalTo(-16) make.right.equalTo(-20)
make.height.equalTo(20) make.height.equalTo(20)
make.top.equalTo(self.titleLabel.snp.bottom).offset(12) make.top.equalTo(self.titleLabel.snp.bottom).offset(16)
} }
professionView.snp.makeConstraints { make in professionView.snp.makeConstraints { make in
make.left.equalTo(16) make.left.equalTo(20)
make.right.equalTo(-16) make.right.equalTo(-20)
make.height.equalTo(20) make.height.equalTo(20)
make.top.equalTo(self.companyView.snp.bottom).offset(14) make.top.equalTo(self.companyView.snp.bottom).offset(16)
} }
industryView.snp.makeConstraints { make in industryView.snp.makeConstraints { make in
make.left.equalTo(16) make.left.equalTo(20)
make.right.equalTo(-16) make.right.equalTo(-20)
make.height.equalTo(20) make.height.equalTo(20)
make.top.equalTo(self.professionView.snp.bottom).offset(14) make.top.equalTo(self.professionView.snp.bottom).offset(16)
make.bottom.equalToSuperview().offset(-16) make.bottom.equalToSuperview().offset(-24)
} }
lineView.snp.makeConstraints { make in lineView.snp.makeConstraints { make in
make.left.equalTo(16) make.left.equalTo(20)
make.right.equalTo(-16) make.right.equalTo(-20)
make.bottom.equalTo(0) make.bottom.equalTo(0)
make.height.equalTo(1) make.height.equalTo(1)
} }
......
...@@ -281,7 +281,7 @@ extension YHNameCardHomePageViewController: UITableViewDelegate, UITableViewData ...@@ -281,7 +281,7 @@ extension YHNameCardHomePageViewController: UITableViewDelegate, UITableViewData
} }
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 16.0 return 1.0
} }
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
......
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