Commit 1429493f authored by Steven杜宇's avatar Steven杜宇

// UI调整

parent 7b3255cf
...@@ -12,6 +12,8 @@ import Kingfisher ...@@ -12,6 +12,8 @@ import Kingfisher
class YHSearchInfoCell: UITableViewCell { class YHSearchInfoCell: UITableViewCell {
static let cellReuseIdentifier = "YHSearchInfoCell" static let cellReuseIdentifier = "YHSearchInfoCell"
static let textFont = UIFont.PFSC_R(ofSize: 15)
var model: YHHomeListModel = YHHomeListModel() var model: YHHomeListModel = YHHomeListModel()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier) super.init(style: style, reuseIdentifier: reuseIdentifier)
...@@ -39,7 +41,7 @@ class YHSearchInfoCell: UITableViewCell { ...@@ -39,7 +41,7 @@ class YHSearchInfoCell: UITableViewCell {
lazy var titleLabel: UILabel = { lazy var titleLabel: UILabel = {
var label = UILabel() var label = UILabel()
label.font = .PFSC_R(ofSize: 15) label.font = Self.textFont
label.textAlignment = .left label.textAlignment = .left
label.textColor = UIColor(hex: 0x121A26) label.textColor = UIColor(hex: 0x121A26)
label.numberOfLines = 2 label.numberOfLines = 2
...@@ -82,7 +84,8 @@ class YHSearchInfoCell: UITableViewCell { ...@@ -82,7 +84,8 @@ class YHSearchInfoCell: UITableViewCell {
func renderHighLightText(_ text: String) { func renderHighLightText(_ text: String) {
var attributedString = NSMutableAttributedString(string:self.model.title, attributes: [ var attributedString = NSMutableAttributedString(string:self.model.title, attributes: [
.foregroundColor: UIColor(hex: 0x121A26) .foregroundColor: UIColor(hex: 0x121A26),
.font: Self.textFont
]) ])
if isEmptyString(text) { if isEmptyString(text) {
self.titleLabel.attributedText = attributedString self.titleLabel.attributedText = attributedString
...@@ -91,7 +94,8 @@ class YHSearchInfoCell: UITableViewCell { ...@@ -91,7 +94,8 @@ class YHSearchInfoCell: UITableViewCell {
// 设置高亮样式 // 设置高亮样式
let highlightAttributes: [NSAttributedString.Key: Any] = [ let highlightAttributes: [NSAttributedString.Key: Any] = [
.foregroundColor: UIColor.brandMainColor .foregroundColor: UIColor.brandMainColor,
.font: Self.textFont
] ]
let ranges = findOccurrencesOfString(text, inString:self.model.title) let ranges = findOccurrencesOfString(text, inString:self.model.title)
......
...@@ -69,7 +69,7 @@ class YHCertificateInfoCell: UITableViewCell { ...@@ -69,7 +69,7 @@ class YHCertificateInfoCell: UITableViewCell {
infoStr = "类型: \(typeStr) | 所属人: \(ownerStr)" infoStr = "类型: \(typeStr) | 所属人: \(ownerStr)"
let attributes: [NSAttributedString.Key: Any] = [ let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize:11), .font: UIFont.PFSC_R(ofSize:12),
.foregroundColor: UIColor.labelTextColor2 .foregroundColor: UIColor.labelTextColor2
] ]
let attrString = NSMutableAttributedString(string: infoStr, attributes: attributes) let attrString = NSMutableAttributedString(string: infoStr, attributes: attributes)
......
...@@ -245,7 +245,7 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { ...@@ -245,7 +245,7 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 52 return 53.0
} }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "Group 33334470@2x.png", "filename" : "Group 2033194042@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "Group 33334470@3x.png", "filename" : "Group 2033194042@3x.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