Commit 61a6767e authored by Steven杜宇's avatar Steven杜宇

// 新增按钮虚线更新

parent a754e2d1
......@@ -32,7 +32,8 @@ class YHFormItemAddCell: UITableViewCell {
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
btn.setTitleColor(btnTitleColor, for: .normal)
btn.iconInLeft(spacing: 6)
btn.setImage(UIImage(named: "form_add_info"), for: .normal)
btn.setImage(UIImage(named: "form_add_info")?.withRenderingMode(.alwaysTemplate), for: .normal)
btn.tintColor = .brandMainColor
btn.addTarget(self, action: #selector(didClickAddBtn), for: .touchUpInside)
return btn
}()
......@@ -67,9 +68,9 @@ class YHFormItemAddCell: UITableViewCell {
let borderLayer = CAShapeLayer()
borderLayer.path = UIBezierPath(roundedRect: CGRect(x: 0, y: 0, width: btnSize.width, height: btnSize.height), cornerRadius: cornerRadius).cgPath
borderLayer.lineWidth = 1
borderLayer.lineWidth = 0.5
//[数组第一个数字表示单个虚线长度,第二个数字表示间隔]
borderLayer.lineDashPattern = [3,1] as [NSNumber]?
borderLayer.lineDashPattern = [2,2] as [NSNumber]?
//前边是虚线的长度,后边是虚线之间空隙的长度
borderLayer.lineDashPhase = 0.1
//实线边框
......
......@@ -28,8 +28,8 @@ class YHOtherInfoFillCell: UITableViewCell {
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
btn.setTitleColor(UIColor.brandMainColor, for: .normal)
btn.iconInLeft(spacing: 6)
btn.setImage(UIImage(named: "form_add_info"), for: .normal)
btn.setImage(UIImage(named: "form_add_info")?.withRenderingMode(.alwaysTemplate), for: .normal)
btn.tintColor = .brandMainColor
btn.addTarget(self, action: #selector(didClickAddBtn), for: .touchUpInside)
return btn
}()
......@@ -39,9 +39,9 @@ class YHOtherInfoFillCell: UITableViewCell {
let borderLayer = CAShapeLayer()
borderLayer.position = CGPoint(x: addBtn.bounds.midX, y: addBtn.bounds.midY);
borderLayer.path = UIBezierPath(roundedRect: borderLayer.bounds, cornerRadius: addBtn.layer.cornerRadius).cgPath
borderLayer.lineWidth = 1
borderLayer.lineWidth = 0.5
//[数组第一个数字表示单个虚线长度,第二个数字表示间隔]
borderLayer.lineDashPattern = [3,1] as [NSNumber]?
borderLayer.lineDashPattern = [2,2] as [NSNumber]?
//前边是虚线的长度,后边是虚线之间空隙的长度
borderLayer.lineDashPhase = 0.1
//实线边框
......
......@@ -28,8 +28,8 @@ class YHWorkItemAddView: UIView {
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
btn.setTitleColor(btnTitleColor, for: .normal)
btn.iconInLeft(spacing: 6)
btn.setImage(UIImage(named: "form_add_info"), for: .normal)
btn.setImage(UIImage(named: "form_add_info")?.withRenderingMode(.alwaysTemplate), for: .normal)
btn.tintColor = .brandMainColor
btn.addTarget(self, action: #selector(didClickAddBtn), for: .touchUpInside)
return btn
}()
......@@ -39,9 +39,9 @@ class YHWorkItemAddView: UIView {
let borderLayer = CAShapeLayer()
borderLayer.position = CGPoint(x: addBtn.bounds.midX, y: addBtn.bounds.midY);
borderLayer.path = UIBezierPath(roundedRect: borderLayer.bounds, cornerRadius: addBtn.layer.cornerRadius).cgPath
borderLayer.lineWidth = 1
borderLayer.lineWidth = 0.5
//[数组第一个数字表示单个虚线长度,第二个数字表示间隔]
borderLayer.lineDashPattern = [3,1] as [NSNumber]?
borderLayer.lineDashPattern = [2,2] as [NSNumber]?
//前边是虚线的长度,后边是虚线之间空隙的长度
borderLayer.lineDashPhase = 0.1
//实线边框
......
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