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

// UI

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