Skip to content

Commit

Permalink
部分组件适配ios13的深色模式
Browse files Browse the repository at this point in the history
  • Loading branch information
choiceyou committed Nov 1, 2019
1 parent 69a5ef2 commit 27495b9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion FWPopupView/FWPopupView.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = "FWPopupView"
s.version = "4.0.8"
s.version = "4.0.9"
s.summary = "自定义弹窗"

# This description is used to generate tags and improve search results.
Expand Down
1 change: 0 additions & 1 deletion FWPopupView/FWPopupView/FWCustomPopupDemoVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class FWCustomPopupDemoVC: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()

self.view.backgroundColor = UIColor.white
self.navigationItem.title = "自定义弹窗"

self.tableView.estimatedRowHeight = 44.0
Expand Down
8 changes: 7 additions & 1 deletion FWPopupView/FWPopupView/FWPopupView/FWAlertView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ extension FWAlertView {
make.right.equalToSuperview().offset(-self.vProperty.letfRigthMargin)
make.height.equalTo(40)
})
self.inputTF?.placeholder = inputPlaceholder
self.inputTF?.attributedPlaceholder = NSAttributedString(string: inputPlaceholder!, attributes: [NSAttributedString.Key.foregroundColor : property.inputPlaceholderColor])
self.inputTF?.textColor = property.inputTextColor
self.inputTF?.textAlignment = .center
self.inputTF?.clearButtonMode = .whileEditing
self.inputTF?.leftViewMode = .always
Expand Down Expand Up @@ -401,6 +402,11 @@ open class FWAlertViewProperty: FWPopupViewProperty {
// 描述文字颜色
@objc open var detailColor: UIColor = kPV_RGBA(r: 51, g: 51, b: 51, a: 1)

// 输入框提示文字颜色
@objc open var inputPlaceholderColor: UIColor = UIColor.lightGray
// 输入框文字颜色
@objc open var inputTextColor: UIColor = kPV_RGBA(r: 51, g: 51, b: 51, a: 1)

// 确定按钮默认名称
@objc open var defaultTextOK = "知道了"
// 取消按钮默认名称
Expand Down
4 changes: 4 additions & 0 deletions FWPopupView/FWPopupView/FWPopupView/FWDateView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ extension FWDateView {

let property = self.vProperty as! FWDateViewProperty

self.datePicker.setValue(property.pickerTextColor, forKey: "textColor")

self.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: property.datePickerHeight + property.btnHeight)

self.cancelBtn = self.setupBtn(frame: CGRect(x: 0, y: 0, width: property.btnWidth, height: property.btnHeight), title: property.cancelBtnTitle, tag: 0)
Expand Down Expand Up @@ -120,6 +122,8 @@ open class FWDateViewProperty : FWPopupViewProperty {
@objc public var btnHeight: CGFloat = 40
// 确定、取消按钮的宽度
@objc public var btnWidth: CGFloat = 60
// 时间选择器文字颜色
@objc public var pickerTextColor: UIColor = kPV_RGBA(r: 51, g: 51, b: 51, a: 1)
// 按钮文字颜色
@objc public var btnTitleColor: UIColor = kPV_RGBA(r: 51, g: 51, b: 51, a: 1)
// 按钮文字大小
Expand Down

0 comments on commit 27495b9

Please sign in to comment.