Commit ce0bd010 authored by David黄金龙's avatar David黄金龙

字体替换

parent cd8777e2
......@@ -54,7 +54,7 @@ class YHTwoOptionAlertView: UIView {
messageLabel = {
let label = UILabel()
label.text = ""
label.font = kFont(size: 16)
label.font = UIFont.PFSC_R(ofSize: 16)
label.textColor = UIColor.mainTextColor
label.textAlignment = .center
label.numberOfLines = 0
......@@ -65,7 +65,7 @@ class YHTwoOptionAlertView: UIView {
leftButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0xffffff)
button.titleLabel?.font = kBoldFont(size: 14)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("取消".local, for: .normal)
button.setTitleColor( UIColor(hex:0x3c86f8), for: .normal)
......@@ -80,7 +80,7 @@ class YHTwoOptionAlertView: UIView {
rightButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0x3c86f8)
button.titleLabel?.font = kBoldFont(size: 14)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("确认".local, for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
......
......@@ -63,7 +63,7 @@ class YHDavidCell3: UITableViewCell {
let bbxLable = UILabel()
bbxLable.text = "银河推荐官"
bbxLable.textColor = UIColor(red: 0.2, green: 0.2, blue: 0.2, alpha: 1)
bbxLable.font = kFont(size: 18)
bbxLable.font = UIFont.PFSC_R(ofSize: 18)
subContentView.addSubview(bbxLable)
bbxLable.snp.makeConstraints { make in
......@@ -75,7 +75,7 @@ class YHDavidCell3: UITableViewCell {
desLable.text = "邀请拉新,合作共赢"
desLable.frame = CGRect(x: 0, y: 0, width: 141.5, height: 11.5)
desLable.textColor = UIColor(red: 0.592, green: 0.592, blue: 0.592, alpha: 1)
desLable.font = kFont(size: 10)
desLable.font = UIFont.PFSC_R(ofSize: 10)
subContentView.addSubview(desLable)
desLable.snp.makeConstraints { make in
make.left.equalTo(bbxLable.snp.right).offset(11)
......
......@@ -67,7 +67,7 @@ class YHDavidCell5: UITableViewCell {
let bbxLable = UILabel()
bbxLable.text = "百宝箱"
bbxLable.textColor = UIColor(red: 0.2, green: 0.2, blue: 0.2, alpha: 1)
bbxLable.font = kFont(size: 18)
bbxLable.font = UIFont.PFSC_R(ofSize: 18)
subContentView.addSubview(bbxLable)
bbxLable.snp.makeConstraints { make in
......@@ -79,7 +79,7 @@ class YHDavidCell5: UITableViewCell {
desLable.text = "香港本地宝,智慧小助手"
desLable.frame = CGRect(x: 0, y: 0, width: 141.5, height: 11.5)
desLable.textColor = UIColor(red: 0.592, green: 0.592, blue: 0.592, alpha: 1)
desLable.font = kFont(size: 10)
desLable.font = UIFont.PFSC_R(ofSize: 10)
subContentView.addSubview(desLable)
desLable.snp.makeConstraints { make in
make.left.equalTo(bbxLable.snp.right).offset(11)
......
......@@ -154,7 +154,7 @@ class YHCardExampleView: UIView {
bottomButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0x4d9ffb)
button.titleLabel?.font = kBoldFont(size: 16)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("知道了", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
......
......@@ -98,7 +98,7 @@ class YHDatePickView: UIView {
closeButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = kBoldFont(size: 14)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("取消", for: .normal)
button.setTitleColor( UIColor.mainTextColor, for: .normal)
......@@ -115,7 +115,7 @@ class YHDatePickView: UIView {
sureButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = kBoldFont(size: 14)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("确定", for: .normal)
button.setTitleColor( UIColor(hex:0x4487f9), for: .normal)
......
......@@ -84,7 +84,7 @@ class YHImagePickerView: UIView {
takePhotoBtton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = kBoldFont(size: 14)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("拍照上传", for: .normal)
button.setTitleColor( UIColor.mainTextColor, for: .normal)
......@@ -101,7 +101,7 @@ class YHImagePickerView: UIView {
selectPhotoButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = kBoldFont(size: 14)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("相册上传", for: .normal)
button.setTitleColor( UIColor.mainTextColor, for: .normal)
......@@ -118,7 +118,7 @@ class YHImagePickerView: UIView {
cannalButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = kBoldFont(size: 14)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("取消", for: .normal)
button.setTitleColor( UIColor(hex:0x909090), for: .normal)
......
......@@ -52,7 +52,7 @@ class YHWorkExampleViewController: YHBaseViewController {
titleLabel = {
let label = UILabel()
label.text = "参考示例"
label.font = kBoldFont(size: 17)
label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.textAlignment = .center
return label
......
......@@ -72,7 +72,7 @@ class YHWorkExperienceListViewController: YHBaseViewController {
bottomButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0x2274ee)
button.titleLabel?.font = kBoldFont(size: 16)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("提交", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
......
......@@ -208,7 +208,7 @@ class YHWorkIntroductionViewController: YHBaseViewController {
bottomButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0x2274ee)
button.titleLabel?.font = kBoldFont(size: 16)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("保存", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
......
......@@ -49,7 +49,7 @@ class YHWorkExampleMessageView: UIView {
titleLabel = {
let label = UILabel()
label.font = kBoldFont(size: 16)
label.font = UIFont.PFSC_M(ofSize: 16)
label.text = "业务支援及人力资源"
label.textAlignment = .left
label.textColor = UIColor.mainTextColor
......
......@@ -30,7 +30,7 @@ class YHWorkExampleTypeView: UIView {
func setUpView() {
titleLabel = {
let label = UILabel()
label.font = kBoldFont(size: 14)
label.font = UIFont.PFSC_M(ofSize: 14)
label.text = "请选择您的行业:"
label.textAlignment = .left
label.textColor = UIColor.mainTextColor
......
......@@ -65,7 +65,7 @@ class YHWorkExperienceListTableViewCell: UITableViewCell {
titleLabel = {
let label = UILabel()
label.font = kFont(size: 16)
label.font = UIFont.PFSC_R(ofSize: 16)
label.text = "主申请人工作经历"
label.textColor = UIColor.mainTextColor
return label
......@@ -95,7 +95,7 @@ class YHWorkExperienceListTableViewCell: UITableViewCell {
cannalButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = kBoldFont(size: 14)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("取消操作", for: .normal)
button.setTitleColor( UIColor(hex:0x2f7ef6), for: .normal)
......
......@@ -32,7 +32,7 @@ class YHWorkFileItemView: UIView {
func setUpView() {
titleLabel = {
let label = UILabel()
label.font = kBoldFont(size: 14)
label.font = UIFont.PFSC_M(ofSize: 14)
label.textAlignment = .left
label.textColor = UIColor.mainTextColor
return label
......
......@@ -35,7 +35,7 @@ class YHWorkIntroductionItemView: UIView {
func setUpView() {
titleLabel = {
let label = UILabel()
label.font = kBoldFont(size: 14)
label.font = UIFont.PFSC_M(ofSize: 14)
label.textAlignment = .left
label.textColor = UIColor.mainTextColor
return label
......
......@@ -64,7 +64,7 @@ class YHWorkIntroductionTableViewCell: UITableViewCell {
titleLabel = {
let label = UILabel()
label.font = kFont(size: 16)
label.font = UIFont.PFSC_R(ofSize: 16)
label.text = "项目介绍(选填)"
label.textColor = UIColor.mainTextColor
return label
......@@ -79,7 +79,7 @@ class YHWorkIntroductionTableViewCell: UITableViewCell {
cannalButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = kBoldFont(size: 14)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("取消操作", for: .normal)
button.setTitleColor( UIColor(hex:0x2f7ef6), for: .normal)
......
......@@ -38,7 +38,7 @@ class YHWorkItemView: UIView {
func setUpView() {
titleLabel = {
let label = UILabel()
label.font = kBoldFont(size: 14)
label.font = UIFont.PFSC_M(ofSize: 14)
label.textAlignment = .left
label.textColor = UIColor.mainTextColor
return label
......@@ -67,7 +67,7 @@ class YHWorkItemView: UIView {
explainLabel = {
let label = UILabel()
label.font = kBoldFont(size: 14)
label.font = UIFont.PFSC_M(ofSize: 14)
label.textAlignment = .right
label.textColor = UIColor.contentBkgColor
return label
......
......@@ -57,7 +57,7 @@ class YHSubmitAllInfoCheckView: UIView {
// titleLabel = {
// let label = UILabel()
// label.text = "同意隐私协议"
// label.font = kFont(size: 16)
// label.font = UIFont.PFSC_R(ofSize: 16)
// label.textColor = UIColor.mainTextColor
// label.textAlignment = .center
// return label
......
......@@ -39,7 +39,7 @@ class YHCodeResultViewController: YHBaseViewController {
loginTitleLabel = {
let label = UILabel()
label.text = "登录后更精彩"
label.font = kBoldFont(size: 32)
label.font = UIFont.PFSC_M(ofSize: 32)
label.textColor = UIColor(hex:0xffffff)
return label
}()
......@@ -53,7 +53,7 @@ class YHCodeResultViewController: YHBaseViewController {
loginSubTitleLabel = {
let label = UILabel()
label.text = "香港美好生活期待与你的相遇"
label.font = kFont(size: 20)
label.font = UIFont.PFSC_R(ofSize: 20)
label.textColor = UIColor(hex:0xffffff)
return label
}()
......@@ -67,7 +67,7 @@ class YHCodeResultViewController: YHBaseViewController {
phoneLabel = {
let label = UILabel()
label.text = "已发送验证码至13352933800"
label.font = kBoldFont(size: 17)
label.font = UIFont.PFSC_M(ofSize: 17)
label.textAlignment = .left
label.textColor = UIColor(hex:0xffffff)
return label
......@@ -96,7 +96,7 @@ class YHCodeResultViewController: YHBaseViewController {
getCodeLabel = {
let button = UILabel()
button.font = kBoldFont(size: 16)
button.font = UIFont.PFSC_M(ofSize: 16)
button.text = "重新发送(58s)"
button.textColor = UIColor(hex:0xffffff)
button.isHidden = false
......@@ -112,7 +112,7 @@ class YHCodeResultViewController: YHBaseViewController {
getCodeButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = kBoldFont(size: 16)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .left
button.setTitle("重新获取验证码", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
......
......@@ -63,7 +63,7 @@ class YHCodeSueecssViewController: YHBaseViewController {
loginTitleLabel = {
let label = UILabel()
label.text = "请输入验证码"
label.font = kBoldFont(size: 28)
label.font = UIFont.PFSC_M(ofSize: 28)
label.textColor = UIColor.mainTextColor
return label
}()
......
......@@ -55,7 +55,7 @@ class YHLoginViewController: YHBaseViewController {
loginTitleLabel = {
let label = UILabel()
label.text = "登录后更精彩"
label.font = kBoldFont(size: 32)
label.font = UIFont.PFSC_M(ofSize: 32)
label.textColor = UIColor(hex:0xffffff)
return label
}()
......@@ -69,7 +69,7 @@ class YHLoginViewController: YHBaseViewController {
loginSubTitleLabel = {
let label = UILabel()
label.text = "香港美好生活期待与你的相遇"
label.font = kFont(size: 20)
label.font = UIFont.PFSC_R(ofSize: 20)
label.textColor = UIColor(hex:0xffffff)
return label
}()
......@@ -83,7 +83,7 @@ class YHLoginViewController: YHBaseViewController {
loginPhoneLabel = {
let label = UILabel()
label.text = "+86 133****3800"
label.font = kBoldFont(size: 20)
label.font = UIFont.PFSC_M(ofSize: 20)
label.textAlignment = .center
label.textColor = UIColor(hex:0xffffff)
return label
......@@ -98,7 +98,7 @@ class YHLoginViewController: YHBaseViewController {
loginButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0x4d9ff8)
button.titleLabel?.font = kBoldFont(size: 16)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("本机号码一键登录", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
......
......@@ -81,7 +81,7 @@ class YHPhoneLoginViewController: YHBaseViewController {
loginTitleLabel = {
let label = UILabel()
label.text = "手机号登录"
label.font = kBoldFont(size: 28)
label.font = UIFont.PFSC_M(ofSize: 28)
label.textColor = UIColor.mainTextColor
return label
}()
......@@ -137,7 +137,7 @@ class YHPhoneLoginViewController: YHBaseViewController {
getCodeButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0x2274ee).withAlphaComponent(0.4)
button.titleLabel?.font = kBoldFont(size: 16)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("获取验证码", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
......
......@@ -33,7 +33,7 @@ class YHPickPhoneAddressViewController: YHBaseViewController {
// loginTitleLabel = {
// let label = UILabel()
// label.text = "登录后更精彩"
// label.font = kBoldFont(size: 32)
// label.font = UIFont.PFSC_M(ofSize: 32)
// label.textColor = UIColor(hex:0xffffff)
// return label
// }()
......
......@@ -42,7 +42,7 @@ class YHVerificationCodeLoginController: YHBaseViewController {
loginTitleLabel = {
let label = UILabel()
label.text = "登录后更精彩"
label.font = kBoldFont(size: 32)
label.font = UIFont.PFSC_M(ofSize: 32)
label.textColor = UIColor(hex:0xffffff)
return label
}()
......@@ -56,7 +56,7 @@ class YHVerificationCodeLoginController: YHBaseViewController {
loginSubTitleLabel = {
let label = UILabel()
label.text = "香港美好生活期待与你的相遇"
label.font = kFont(size: 20)
label.font = UIFont.PFSC_R(ofSize: 20)
label.textColor = UIColor(hex:0xffffff)
return label
}()
......@@ -70,7 +70,7 @@ class YHVerificationCodeLoginController: YHBaseViewController {
phoneLabel = {
let label = UILabel()
label.text = "未注册手机验证后完成注册"
label.font = kBoldFont(size: 17)
label.font = UIFont.PFSC_M(ofSize: 17)
label.textAlignment = .left
label.textColor = UIColor(hex:0xffffff)
return label
......@@ -105,7 +105,7 @@ class YHVerificationCodeLoginController: YHBaseViewController {
getCodeButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0xd8d8d8).withAlphaComponent(0.8)
button.titleLabel?.font = kBoldFont(size: 16)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("获取验证码", for: .normal)
button.setTitleColor( UIColor(hex:0x979797), for: .normal)
......@@ -122,7 +122,7 @@ class YHVerificationCodeLoginController: YHBaseViewController {
}
emailButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = kBoldFont(size: 16)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.setTitle("邮箱登录", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
return button
......
......@@ -32,7 +32,7 @@ class YHLoginStyleButton: UIButton {
messageLabel = {
let label = UILabel()
label.font = kBoldFont(size: 16)
label.font = UIFont.PFSC_M(ofSize: 16)
label.textColor = UIColor(hex:0xffffff)
label.textAlignment = .right
return label
......
......@@ -28,7 +28,7 @@ class YHPhoneMessageView: UIView {
func setView() {
messageButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = kBoldFont(size: 16)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.setTitle("+86", for: .normal)
button.setTitleColor( UIColor(hex:0x000000), for: .normal)
button.addTarget(self, action: #selector(messageClick), for: .touchUpInside)
......@@ -56,7 +56,7 @@ class YHPhoneMessageView: UIView {
phoneTextField = {
let text = UITextField()
text.placeholder = "请输入签约手机号"
text.font = kFont(size: 16)
text.font = UIFont.PFSC_R(ofSize: 16)
text.textColor = UIColor(hex:0x000000)
text.textAlignment = .left
text.keyboardType = .phonePad
......
......@@ -114,25 +114,6 @@ func kIsEmpty(string: String) -> Bool {
}
}
/** 文字大小设置
* parameter name 字体名字 (为空时默认字体)
* parameter size 字体大小
*/
func kFont(name: String = "", size: CGFloat) -> UIFont {
if !kIsEmpty(string: name) {
return UIFont.init(name: name, size: size)!
}else {
return UIFont.systemFont(ofSize: size)
}
}
func kBoldFont(name: String = "", size: CGFloat) -> UIFont {
if !kIsEmpty(string: name) {
return UIFont.init(name: name, size: size)!
}else {
return UIFont.boldSystemFont(ofSize: size)
}
}
/// 版本号相同:
func systemVersionEqual(version:String) -> Bool {
......
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