Commit 4e4d1a30 authored by David黄金龙's avatar David黄金龙

调整 stepview 的 UI ---- 文字大小 及 使用

parent 0a645be6
......@@ -170,7 +170,7 @@ extension YHSelectCountryViewController: UICollectionViewDelegate, UICollectionV
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
let string = hotDataSource[indexPath.row]
let size = (string as NSString).size(withAttributes: [NSAttributedString.Key.font : kFont(size: 13)])
let size = (string as NSString).size(withAttributes: [NSAttributedString.Key.font : UIFont.PFSC_R(ofSize: 13)])
return CGSize(width: size.width + 25, height: 32) // 这里可以根据需求设置不同的尺寸
}
......@@ -199,7 +199,7 @@ class YHCountryCollectionViewCell: UICollectionViewCell {
label = {
let view = UILabel()
view.textAlignment = .center
view.font = kFont(size: 13)
view.font = UIFont.PFSC_R(ofSize: 13)
view.textColor = UIColor(hex: 0x222222)
view.backgroundColor = UIColor(hex: 0xf8f9fb)
view.layer.masksToBounds = true
......@@ -240,7 +240,7 @@ class YHCountryTableViewCell: UITableViewCell {
func setupUI() {
titleLabel = {
let label = UILabel()
label.font = kFont(size: 13)
label.font = UIFont.PFSC_R(ofSize: 13)
label.textColor = UIColor(hex:0x222222)
return label
}()
......
......@@ -69,10 +69,10 @@ class YHStepView: UIScrollView {
}
let label = UILabel()
label.text = array[i]
label.font = kFont(size: 13)
label.font = UIFont.PFSC_R(ofSize: 13)
label.textAlignment = .center
label.tag = 2000 + i
label.textColor = UIColor.init(hex: 0x222222)
label.textColor = UIColor.mainTextColor
addSubview(label)
label.snp.makeConstraints { make in
make.centerX.equalTo(button.snp.centerX)
......@@ -100,13 +100,13 @@ class YHStepView: UIScrollView {
if currentIndex == i {
button.setBackgroundImage(UIImage(named: "service_step_now"), for: .normal)
label.textColor = UIColor.init(hex: 0x4388ff)
label.textColor = UIColor.brandMainColor
} else if i < currentIndex {
button.setBackgroundImage(UIImage(named: "service_step_success"), for: .normal)
label.textColor = UIColor.init(hex: 0x222222)
label.textColor = UIColor.mainTextColor
} else {
button.setBackgroundImage(UIImage(named: "service_step_fail"), for: .normal)
label.textColor = UIColor.init(hex: 0xc0c0c0)
label.textColor = UIColor.placeHolderColor
}
}
}
......@@ -125,13 +125,16 @@ class YHStepView: UIScrollView {
}
if currentIndex == i {
button?.setBackgroundImage(UIImage(named: "service_step_now"), for: .normal)
lable?.textColor = UIColor.init(hex: 0x4388ff)
lable?.textColor = UIColor.brandMainColor
lable?.font = UIFont.PFSC_M(ofSize: 13)
} else if i < currentIndex {
button?.setBackgroundImage(UIImage(named: "service_step_success"), for: .normal)
lable?.textColor = UIColor.init(hex: 0x222222)
lable?.textColor = UIColor.mainTextColor
lable?.font = UIFont.PFSC_R(ofSize: 13)
} else {
button?.setBackgroundImage(UIImage(named: "service_step_fail"), for: .normal)
lable?.textColor = UIColor.init(hex: 0xc0c0c0)
lable?.textColor = UIColor.placeHolderColor
lable?.font = UIFont.PFSC_R(ofSize: 13)
}
}
}
......
......@@ -55,7 +55,7 @@ class YHWorkActionView: UIView {
exampleButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = kFont(size: 13)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 13)
button.contentHorizontalAlignment = .center
button.setTitle("参考示例", for: .normal)
button.setTitleColor( UIColor(hex:0x2f7ef6), for: .normal)
......
......@@ -72,7 +72,7 @@ class YHWorkExampleTypeView: UIView {
button.setTitle(dataSource[i], for: .normal)
button.setTitleColor(UIColor(hex: 0x222222), for: .normal)
button.setBackgroundColor(color: UIColor(hex: 0xf8f9fb), forState: .normal)
button.titleLabel?.font = kFont(size: 13)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 13)
button.layer.cornerRadius = 16
button.tag = 3000 + i
button.addTarget(self, action: #selector(exampleClick(sender:)), for: .touchUpInside)
......
......@@ -109,7 +109,7 @@ class YHWorkMessageSelectTableViewCell: UITableViewCell {
button.setTitleColor(UIColor(hex: 0x2f7ef6), for: .selected)
button.setTitleColor(UIColor(hex: 0x222222), for: .normal)
button.setTitle("是", for: .normal)
button.titleLabel?.font = kFont(size: 13)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 13)
button.layer.cornerRadius = 16
button.layer.borderWidth = 1
button.layer.borderColor = UIColor(hex: 0x2f7ef6).cgColor
......@@ -131,7 +131,7 @@ class YHWorkMessageSelectTableViewCell: UITableViewCell {
button.setTitleColor(UIColor(hex: 0x2f7ef6), for: .selected)
button.setTitleColor(UIColor(hex: 0x222222), for: .normal)
button.setTitle("否", for: .normal)
button.titleLabel?.font = kFont(size: 13)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 13)
button.layer.cornerRadius = 16
button.addTarget(self, action: #selector(leftClick), for: .touchUpInside)
return button
......
......@@ -78,7 +78,7 @@ class YHCodeSueecssViewController: YHBaseViewController {
loginSubTitleLabel = {
let label = UILabel()
label.text = "已发送至 \(phoneNumber ?? "")"
label.font = kFont(size: 13)
label.font = UIFont.PFSC_R(ofSize: 13)
label.textColor = UIColor(hex:0xc0c0c0)
return label
}()
......
......@@ -96,7 +96,7 @@ class YHPhoneLoginViewController: YHBaseViewController {
loginSubTitleLabel = {
let label = UILabel()
label.text = "手机号首次登录自动注册"
label.font = kFont(size: 13)
label.font = UIFont.PFSC_R(ofSize: 13)
label.textColor = UIColor(hex:0xc0c0c0)
return label
}()
......
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