Commit 9ed7e618 authored by David黄金龙's avatar David黄金龙

1、是否 按钮的背景色 字体大小

2、背景色
parent ea627324
......@@ -36,7 +36,7 @@ class YHSelectCountryViewController: YHBaseViewController {
searchView = {
let searchBar = UITextField()
searchBar.placeholder = "搜索国家/地区"
searchBar.backgroundColor = UIColor(hex: 0xf8f9fb)
searchBar.backgroundColor = UIColor.contentBkgColor
searchBar.keyboardType = .default
searchBar.delegate = self
searchBar.layer.cornerRadius = 21
......@@ -201,7 +201,7 @@ class YHCountryCollectionViewCell: UICollectionViewCell {
view.textAlignment = .center
view.font = UIFont.PFSC_R(ofSize: 13)
view.textColor = UIColor.mainTextColor
view.backgroundColor = UIColor(hex: 0xf8f9fb)
view.backgroundColor = UIColor.contentBkgColor
view.layer.masksToBounds = true
view.layer.cornerRadius = 16
return view
......
......@@ -28,7 +28,7 @@ class YHBottomNextView: UIView {
func setUpView() {
saveButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor.mainTextColor
button.backgroundColor = UIColor.contentBkgColor
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.contentHorizontalAlignment = .center
button.setTitle("保存", for: .normal)
......
......@@ -83,12 +83,12 @@ class YHItemView: UIView {
rightButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex: 0x4487f9).withAlphaComponent(0.08)
button.setTitleColor(UIColor(hex: 0x4487f9), for: .selected)
button.backgroundColor = UIColor.brandMainColor.withAlphaComponent(0.08)
button.setTitleColor(UIColor.brandMainColor, for: .selected)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.layer.cornerRadius = 16
button.layer.borderWidth = 1
button.layer.borderColor = UIColor(hex: 0x4487f9).cgColor
button.layer.borderColor = UIColor.brandMainColor.cgColor
button.isSelected = true
button.addTarget(self, action: #selector(rightClick), for: .touchUpInside)
return button
......@@ -103,8 +103,8 @@ class YHItemView: UIView {
leftButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex: 0xf8f9fb)
button.setTitleColor(UIColor(hex: 0x4487f9), for: .selected)
button.backgroundColor = UIColor.contentBkgColor
button.setTitleColor(UIColor.brandMainColor, for: .selected)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.layer.cornerRadius = 16
button.addTarget(self, action: #selector(leftClick), for: .touchUpInside)
......@@ -195,49 +195,61 @@ class YHItemView: UIView {
leftButton.isSelected = true
rightButton.isSelected = false
leftButton.layer.borderWidth = 1
leftButton.layer.borderColor = UIColor(hex: 0x4487f9).cgColor
leftButton.backgroundColor = UIColor(hex: 0x4487f9).withAlphaComponent(0.08)
rightButton.backgroundColor = UIColor(hex: 0xf8f9fb)
leftButton.layer.borderColor = UIColor.brandMainColor.cgColor
leftButton.backgroundColor = UIColor.brandMainColor.withAlphaComponent(0.08)
rightButton.backgroundColor = UIColor.contentBkgColor
rightButton.layer.borderWidth = 0
leftButton.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
rightButton.titleLabel?.font = UIFont.PFSC_R(ofSize: 13)
} else {
rightButton.isSelected = true
leftButton.isSelected = false
rightButton.layer.borderWidth = 1
rightButton.layer.borderColor = UIColor(hex: 0x4487f9).cgColor
rightButton.backgroundColor = UIColor(hex: 0x4487f9).withAlphaComponent(0.08)
leftButton.backgroundColor = UIColor(hex: 0xf8f9fb)
rightButton.layer.borderColor = UIColor.brandMainColor.cgColor
rightButton.backgroundColor = UIColor.brandMainColor.withAlphaComponent(0.08)
leftButton.backgroundColor = UIColor.contentBkgColor
leftButton.layer.borderWidth = 0
rightButton.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
leftButton.titleLabel?.font = UIFont.PFSC_R(ofSize: 13)
}
}
@objc func rightClick() {
rightButton.isSelected = true
leftButton.isSelected = false
rightButton.layer.borderWidth = 1
rightButton.layer.borderColor = UIColor(hex: 0x4487f9).cgColor
rightButton.backgroundColor = UIColor(hex: 0x4487f9).withAlphaComponent(0.08)
leftButton.backgroundColor = UIColor(hex: 0xf8f9fb)
rightButton.layer.borderColor = UIColor.brandMainColor.cgColor
rightButton.backgroundColor = UIColor.brandMainColor.withAlphaComponent(0.08)
leftButton.backgroundColor = UIColor.contentBkgColor
leftButton.layer.borderWidth = 0
dataSource?.message = "0"
dataSource?.value = ["0"]
if let block = block {
block(dataSource ?? YHItemModel())
}
rightButton.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
leftButton.titleLabel?.font = UIFont.PFSC_R(ofSize: 13)
}
@objc func leftClick() {
leftButton.isSelected = true
rightButton.isSelected = false
leftButton.layer.borderWidth = 1
leftButton.layer.borderColor = UIColor(hex: 0x4487f9).cgColor
leftButton.backgroundColor = UIColor(hex: 0x4487f9).withAlphaComponent(0.08)
rightButton.backgroundColor = UIColor(hex: 0xf8f9fb)
leftButton.layer.borderColor = UIColor.brandMainColor.cgColor
leftButton.backgroundColor = UIColor.brandMainColor.withAlphaComponent(0.08)
rightButton.backgroundColor = UIColor.contentBkgColor
rightButton.layer.borderWidth = 0
dataSource?.message = "1"
dataSource?.value = ["1"]
if let block = block {
block(dataSource ?? YHItemModel())
}
leftButton.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
rightButton.titleLabel?.font = UIFont.PFSC_R(ofSize: 13)
}
@objc func centerClick() {
......
......@@ -147,7 +147,7 @@ class YHWorkIntroductionViewController: YHBaseViewController {
messageTextField = {
let textField = UITextView()
textField.backgroundColor = UIColor(hex: 0xf8f9fb)
textField.backgroundColor = UIColor.contentBkgColor
textField.font = UIFont.PFSC_R(ofSize: 14)
textField.layer.cornerRadius = 6
textField.delegate = self
......
......@@ -46,7 +46,7 @@ class YHWorkExampleMessageTableViewCell: UITableViewCell {
backgroundColor = .white
centerView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0xf8f9fb)
view.backgroundColor = UIColor.contentBkgColor
view.layer.cornerRadius = 8
return view
}()
......
......@@ -71,7 +71,7 @@ class YHWorkExampleTypeView: UIView {
let button = UIButton(type: .custom)
button.setTitle(dataSource[i], for: .normal)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.setBackgroundColor(color: UIColor(hex: 0xf8f9fb), forState: .normal)
button.setBackgroundColor(color: UIColor.contentBkgColor, forState: .normal)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 13)
button.layer.cornerRadius = 16
button.tag = 3000 + i
......
......@@ -81,12 +81,12 @@ class YHWorkExperienceItemView: UIView {
rightButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex: 0x4487f9).withAlphaComponent(0.08)
button.setTitleColor(UIColor(hex: 0x4487f9), for: .selected)
button.backgroundColor = UIColor.brandMainColor.withAlphaComponent(0.08)
button.setTitleColor(UIColor.brandMainColor, for: .selected)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.layer.cornerRadius = 16
button.layer.borderWidth = 1
button.layer.borderColor = UIColor(hex: 0x4487f9).cgColor
button.layer.borderColor = UIColor.brandMainColor.cgColor
button.isSelected = true
button.addTarget(self, action: #selector(rightClick), for: .touchUpInside)
return button
......@@ -101,8 +101,8 @@ class YHWorkExperienceItemView: UIView {
leftButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex: 0xf8f9fb)
button.setTitleColor(UIColor(hex: 0x4487f9), for: .selected)
button.backgroundColor = UIColor.contentBkgColor
button.setTitleColor(UIColor.brandMainColor, for: .selected)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.layer.cornerRadius = 16
button.addTarget(self, action: #selector(leftClick), for: .touchUpInside)
......@@ -193,17 +193,17 @@ class YHWorkExperienceItemView: UIView {
leftButton.isSelected = true
rightButton.isSelected = false
leftButton.layer.borderWidth = 1
leftButton.layer.borderColor = UIColor(hex: 0x4487f9).cgColor
leftButton.backgroundColor = UIColor(hex: 0x4487f9).withAlphaComponent(0.08)
rightButton.backgroundColor = UIColor(hex: 0xf8f9fb)
leftButton.layer.borderColor = UIColor.brandMainColor.cgColor
leftButton.backgroundColor = UIColor.brandMainColor.withAlphaComponent(0.08)
rightButton.backgroundColor = UIColor.contentBkgColor
rightButton.layer.borderWidth = 0
} else {
rightButton.isSelected = true
leftButton.isSelected = false
rightButton.layer.borderWidth = 1
rightButton.layer.borderColor = UIColor(hex: 0x4487f9).cgColor
rightButton.backgroundColor = UIColor(hex: 0x4487f9).withAlphaComponent(0.08)
leftButton.backgroundColor = UIColor(hex: 0xf8f9fb)
rightButton.layer.borderColor = UIColor.brandMainColor.cgColor
rightButton.backgroundColor = UIColor.brandMainColor.withAlphaComponent(0.08)
leftButton.backgroundColor = UIColor.contentBkgColor
leftButton.layer.borderWidth = 0
}
}
......@@ -212,9 +212,9 @@ class YHWorkExperienceItemView: UIView {
rightButton.isSelected = true
leftButton.isSelected = false
rightButton.layer.borderWidth = 1
rightButton.layer.borderColor = UIColor(hex: 0x4487f9).cgColor
rightButton.backgroundColor = UIColor(hex: 0x4487f9).withAlphaComponent(0.08)
leftButton.backgroundColor = UIColor(hex: 0xf8f9fb)
rightButton.layer.borderColor = UIColor.brandMainColor.cgColor
rightButton.backgroundColor = UIColor.brandMainColor.withAlphaComponent(0.08)
leftButton.backgroundColor = UIColor.contentBkgColor
leftButton.layer.borderWidth = 0
dataSource?.message = "0"
dataSource?.value = ["0"]
......@@ -227,9 +227,9 @@ class YHWorkExperienceItemView: UIView {
leftButton.isSelected = true
rightButton.isSelected = false
leftButton.layer.borderWidth = 1
leftButton.layer.borderColor = UIColor(hex: 0x4487f9).cgColor
leftButton.backgroundColor = UIColor(hex: 0x4487f9).withAlphaComponent(0.08)
rightButton.backgroundColor = UIColor(hex: 0xf8f9fb)
leftButton.layer.borderColor = UIColor.brandMainColor.cgColor
leftButton.backgroundColor = UIColor.brandMainColor.withAlphaComponent(0.08)
rightButton.backgroundColor = UIColor.contentBkgColor
rightButton.layer.borderWidth = 0
dataSource?.message = "1"
dataSource?.value = ["1"]
......
......@@ -47,7 +47,7 @@ class YHWorkExperienceTextItemView: UIView {
messageTextField = {
let textField = UITextView()
textField.backgroundColor = UIColor(hex: 0xf8f9fb)
textField.backgroundColor = UIColor.contentBkgColor
textField.layer.cornerRadius = 4
textField.delegate = self
return textField
......
......@@ -127,7 +127,7 @@ class YHWorkMessageSelectTableViewCell: UITableViewCell {
leftButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex: 0xf8f9fb)
button.backgroundColor = UIColor.contentBkgColor
button.setTitleColor(UIColor(hex: 0x2f7ef6), for: .selected)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.setTitle("否", for: .normal)
......@@ -152,7 +152,7 @@ class YHWorkMessageSelectTableViewCell: UITableViewCell {
leftButton.layer.borderWidth = 1
leftButton.layer.borderColor = UIColor(hex: 0x2f7ef6).cgColor
leftButton.backgroundColor = UIColor(hex: 0x2f7ef6).withAlphaComponent(0.08)
rightButton.backgroundColor = UIColor(hex: 0xf8f9fb)
rightButton.backgroundColor = UIColor.contentBkgColor
rightButton.layer.borderWidth = 0
} else {
rightButton.isSelected = true
......@@ -160,7 +160,7 @@ class YHWorkMessageSelectTableViewCell: UITableViewCell {
rightButton.layer.borderWidth = 1
rightButton.layer.borderColor = UIColor(hex: 0x2f7ef6).cgColor
rightButton.backgroundColor = UIColor(hex: 0x2f7ef6).withAlphaComponent(0.08)
leftButton.backgroundColor = UIColor(hex: 0xf8f9fb)
leftButton.backgroundColor = UIColor.contentBkgColor
leftButton.layer.borderWidth = 0
}
}
......@@ -171,7 +171,7 @@ class YHWorkMessageSelectTableViewCell: UITableViewCell {
rightButton.layer.borderWidth = 1
rightButton.layer.borderColor = UIColor(hex: 0x2f7ef6).cgColor
rightButton.backgroundColor = UIColor(hex: 0x2f7ef6).withAlphaComponent(0.08)
leftButton.backgroundColor = UIColor(hex: 0xf8f9fb)
leftButton.backgroundColor = UIColor.contentBkgColor
leftButton.layer.borderWidth = 0
}
......@@ -181,7 +181,7 @@ class YHWorkMessageSelectTableViewCell: UITableViewCell {
leftButton.layer.borderWidth = 1
leftButton.layer.borderColor = UIColor(hex: 0x2f7ef6).cgColor
leftButton.backgroundColor = UIColor(hex: 0x2f7ef6).withAlphaComponent(0.08)
rightButton.backgroundColor = UIColor(hex: 0xf8f9fb)
rightButton.backgroundColor = UIColor.contentBkgColor
rightButton.layer.borderWidth = 0
}
......
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