diff --git a/FWPopupView.podspec b/FWPopupView.podspec index c685fe5..c5e6f3f 100644 --- a/FWPopupView.podspec +++ b/FWPopupView.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| # s.name = "FWPopupView" - s.version = "4.1.6" + s.version = "4.2.0" s.summary = "自定义弹窗" # This description is used to generate tags and improve search results. diff --git a/FWPopupView/FWAlertView.swift b/FWPopupView/FWAlertView.swift index d5dab7b..1482d66 100644 --- a/FWPopupView/FWAlertView.swift +++ b/FWPopupView/FWAlertView.swift @@ -32,6 +32,7 @@ open class FWAlertView: FWPopupView { private var detailLabel: UILabel? private var inputTF: UITextField? private var customView: UIView? + private var btnContrainerView: UIView! private var commponenetCount: Int = 0 @@ -203,7 +204,7 @@ extension FWAlertView { make.right.equalToSuperview().offset(-self.vProperty.letfRigthMargin) }) self.titleLabel?.text = title - self.titleLabel?.textColor = self.vProperty.titleColor + self.titleLabel?.textColor = UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.titleColor, darkColor: self.vProperty.dark_titleColor) self.titleLabel?.textAlignment = .center self.titleLabel?.font = (self.vProperty.titleFont != nil) ? self.vProperty.titleFont! : UIFont.systemFont(ofSize: self.vProperty.titleFontSize) self.titleLabel?.numberOfLines = 5 @@ -223,7 +224,7 @@ extension FWAlertView { make.height.lessThanOrEqualTo(self.superview!.frame.size.height*property.popupViewMaxHeightRate-100) }) self.detailLabel?.text = detail - self.detailLabel?.textColor = property.detailColor + self.detailLabel?.textColor = UIColor.fw_colorWithStyleColors(lightColor: property.detailColor, darkColor: property.dark_detailColor) self.detailLabel?.textAlignment = .center self.detailLabel?.font = (property.detailFont != nil) ? property.detailFont! : UIFont.systemFont(ofSize: property.detailFontSize) self.detailLabel?.numberOfLines = 0 @@ -243,11 +244,11 @@ extension FWAlertView { make.height.equalTo(40) }) self.inputTF?.attributedPlaceholder = NSAttributedString(string: inputPlaceholder!, attributes: [NSAttributedString.Key.foregroundColor : property.inputPlaceholderColor]) - self.inputTF?.textColor = property.inputTextColor + self.inputTF?.textColor = UIColor.fw_colorWithStyleColors(lightColor: property.inputTextColor, darkColor: property.dark_inputTextColor) self.inputTF?.textAlignment = .center self.inputTF?.clearButtonMode = .whileEditing self.inputTF?.leftViewMode = .always - self.inputTF?.layer.borderColor = self.vProperty.splitColor.cgColor + self.inputTF?.layer.borderColor = UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.splitColor, darkColor: self.vProperty.dark_splitColor).cgColor self.inputTF?.layer.borderWidth = self.vProperty.splitWidth self.inputTF?.layer.cornerRadius = self.vProperty.cornerRadius self.inputTF?.keyboardType = keyboardType @@ -270,7 +271,7 @@ extension FWAlertView { lastConstraintItem = self.customView!.snp.bottom } - let btnContrainerView = UIView() + btnContrainerView = UIView() self.addSubview(btnContrainerView) btnContrainerView.backgroundColor = UIColor.clear btnContrainerView.snp.makeConstraints { (make) in @@ -322,16 +323,14 @@ extension FWAlertView { // 按钮背景颜色 if popupItem.itemBackgroundColor != nil { - btn.backgroundColor = popupItem.itemBackgroundColor + btn.backgroundColor = UIColor.fw_colorWithStyleColors(lightColor: popupItem.itemBackgroundColor, darkColor: popupItem.dark_itemBackgroundColor) } else { - btn.backgroundColor = self.backgroundColor + btn.backgroundColor = UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.backgroundColor, darkColor: self.vProperty.dark_backgroundColor) } // 按钮文字颜色 - if popupItem.itemTitleColor != nil { - btn.setTitleColor(popupItem.itemTitleColor, for: .normal) - } else { - btn.setTitleColor(popupItem.highlight ? self.vProperty.itemHighlightColor : self.vProperty.itemNormalColor, for: .normal) - } + let titleLightColor = (popupItem.itemTitleColor != nil) ? popupItem.itemTitleColor : ((popupItem.highlight == true) ? self.vProperty.itemHighlightColor : self.vProperty.itemNormalColor) + let titleDarkColor = (popupItem.dark_itemTitleColor != nil) ? popupItem.dark_itemTitleColor : ((popupItem.highlight == true) ? self.vProperty.dark_itemHighlightColor : self.vProperty.dark_itemNormalColor) + btn.setTitleColor(UIColor.fw_colorWithStyleColors(lightColor: titleLightColor, darkColor: titleDarkColor), for: .normal) // 按钮文字大小 if popupItem.itemTitleFont != nil { @@ -342,9 +341,9 @@ extension FWAlertView { btn.setTitle(popupItem.title, for: .normal) btn.layer.borderWidth = self.vProperty.splitWidth - btn.layer.borderColor = self.vProperty.splitColor.cgColor + btn.layer.borderColor = UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.splitColor, darkColor: self.vProperty.dark_splitColor).cgColor btn.setBackgroundImage(self.getImageWithColor(color: btn.backgroundColor!), for: .normal) - btn.setBackgroundImage(self.getImageWithColor(color: self.vProperty.itemPressedColor), for: .highlighted) + btn.setBackgroundImage(self.getImageWithColor(color: UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.itemPressedColor, darkColor: self.vProperty.dark_itemPressedColor)), for: .highlighted) tmpIndex += 1 } @@ -356,6 +355,26 @@ extension FWAlertView { make.bottom.equalTo(btnContrainerView.snp.bottom) } } + + open override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { + super.traitCollectionDidChange(previousTraitCollection) + + if #available(iOS 13.0, *), FWPopupSWindow.sharedInstance.compatibleDarkStyle == true { + if self.traitCollection.hasDifferentColorAppearance(comparedTo: previousTraitCollection) { + for tmpView: UIView in self.btnContrainerView.subviews { + let btn: UIButton = tmpView as! UIButton + btn.setBackgroundImage(self.getImageWithColor(color: btn.backgroundColor!), for: .normal) + if self.traitCollection.userInterfaceStyle == .dark { + btn.layer.borderColor = self.vProperty.dark_splitColor.cgColor + btn.setBackgroundImage(self.getImageWithColor(color: self.vProperty.dark_itemPressedColor), for: .highlighted) + } else { + btn.layer.borderColor = self.vProperty.splitColor.cgColor + btn.setBackgroundImage(self.getImageWithColor(color: self.vProperty.itemPressedColor), for: .highlighted) + } + } + } + } + } } extension FWAlertView { @@ -415,6 +434,16 @@ open class FWAlertViewProperty: FWPopupViewProperty { @objc open var defaultTextConfirm = "确定" + // ===== 深色模式 ===== + + // 深色模式:描述文字颜色 + @objc open var dark_detailColor: UIColor = kPV_RGBA(r: 149, g: 149, b: 149, a: 1) + // 深色模式:输入框提示文字颜色 + @objc open var dark_inputPlaceholderColor: UIColor = UIColor.lightGray + // 深色模式:输入框文字颜色 + @objc open var dark_inputTextColor: UIColor = kPV_RGBA(r: 149, g: 149, b: 149, a: 1) + + public override func reSetParams() { super.reSetParams() diff --git a/FWPopupView/FWCustomSheetView.swift b/FWPopupView/FWCustomSheetView.swift index 2a75363..31c21b7 100644 --- a/FWPopupView/FWCustomSheetView.swift +++ b/FWPopupView/FWCustomSheetView.swift @@ -14,7 +14,7 @@ class FWCustomSheetViewTableViewCell: UITableViewCell { var imgView: UIImageView! var titleLabel: UILabel! var secondaryTitleLabel: UILabel! - var line: CALayer! + var line: UIView! override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) @@ -30,8 +30,8 @@ class FWCustomSheetViewTableViewCell: UITableViewCell { self.secondaryTitleLabel.numberOfLines = 1 self.addSubview(self.secondaryTitleLabel) - self.line = CALayer() - self.layer.addSublayer(self.line) + self.line = UIView() + self.addSubview(self.line) } required init?(coder aDecoder: NSCoder) { @@ -42,7 +42,7 @@ class FWCustomSheetViewTableViewCell: UITableViewCell { self.selectionStyle = property.selectionStyle self.line.frame = CGRect(x: property.separatorInset.left, y: ceil(self.frame.height-property.splitWidth), width: self.frame.width-property.separatorInset.left-property.separatorInset.right, height: property.splitWidth) - self.line.backgroundColor = property.splitColor.cgColor + self.line.backgroundColor = UIColor.fw_colorWithStyleColors(lightColor: property.splitColor, darkColor: property.dark_splitColor) var leftMargin = property.letfRigthMargin @@ -167,13 +167,13 @@ extension FWCustomSheetView { // 绘制头部视图 if headerTitle != nil { self.headerView = UIView(frame: CGRect(x: 0, y: 0, width: selfSize.width, height: property.headerViewHeight)) - self.headerView?.backgroundColor = self.vProperty.backgroundColor + self.headerView?.backgroundColor = UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.backgroundColor, darkColor: self.vProperty.dark_backgroundColor) self.addSubview(self.headerView!) - let line = CALayer() + let line = UIView() line.frame = CGRect(x: 0, y: floor(property.headerViewHeight-property.splitWidth), width: selfSize.width, height: property.splitWidth) - line.backgroundColor = property.splitColor.cgColor - self.headerView!.layer.addSublayer(line) + line.backgroundColor = UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.splitColor, darkColor: self.vProperty.dark_splitColor) + self.headerView!.addSubview(line) let titleLabel = UILabel(frame: CGRect(x: property.letfRigthMargin, y: 0, width: selfSize.width-property.letfRigthMargin*3, height: property.headerViewHeight)) self.headerView!.addSubview(titleLabel) @@ -204,7 +204,7 @@ extension FWCustomSheetView { self.tableView.register(FWCustomSheetViewTableViewCell.self, forCellReuseIdentifier: "cellId") self.tableView.separatorStyle = .none - self.tableView.backgroundColor = self.backgroundColor + self.tableView.backgroundColor = UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.backgroundColor, darkColor: self.vProperty.dark_backgroundColor) self.tableView.bounces = property.bounces if property.popupViewMaxHeightRate > 0 && property.popupViewItemHeight * CGFloat(self.itemsCount()) > property.popupViewMaxHeightRate*self.superview!.frame.size.height { @@ -239,7 +239,7 @@ extension FWCustomSheetView { public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "cellId", for: indexPath) as! FWCustomSheetViewTableViewCell cell.setupContent(title: (self.itemTitleArray != nil) ? self.itemTitleArray![indexPath.row] : nil, secondaryTitle: (self.itemSecondaryTitleArray != nil) ? self.itemSecondaryTitleArray![indexPath.row] : nil, image: (self.itemImageNameArray != nil) ? self.itemImageNameArray![indexPath.row] : nil, property: self.vProperty as! FWCustomSheetViewProperty) - cell.backgroundColor = self.vProperty.backgroundColor + cell.backgroundColor = UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.backgroundColor, darkColor: self.vProperty.dark_backgroundColor) let property = self.vProperty as! FWCustomSheetViewProperty if property.lastNeedAccessoryView == true && indexPath.row == (self.itemsCount()-1) { @@ -362,8 +362,6 @@ open class FWCustomSheetViewProperty: FWPopupViewProperty { /// 选中风格 @objc public var selectionStyle: UITableViewCell.SelectionStyle = .none - /// 分割线颜色 - @objc public var separatorColor: UIColor = kPV_RGBA(r: 231, g: 231, b: 231, a: 1) /// 分割线偏移量 @objc public var separatorInset: UIEdgeInsets = UIEdgeInsets.zero @@ -375,7 +373,7 @@ open class FWCustomSheetViewProperty: FWPopupViewProperty { self.buttonFontSize = 15 - self.titleTextAttributes = [NSAttributedString.Key.foregroundColor: self.itemNormalColor, NSAttributedString.Key.backgroundColor: UIColor.clear, NSAttributedString.Key.font: UIFont.systemFont(ofSize: self.buttonFontSize)] + self.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.fw_colorWithStyleColors(lightColor: self.itemNormalColor, darkColor: self.dark_itemNormalColor), NSAttributedString.Key.backgroundColor: UIColor.clear, NSAttributedString.Key.font: UIFont.systemFont(ofSize: self.buttonFontSize)] let tmpColor = kPV_RGBA(r: 138, g: 146, b: 165, a: 1) self.secondaryTitleTextAttributes = [NSAttributedString.Key.foregroundColor: tmpColor, NSAttributedString.Key.backgroundColor: UIColor.clear, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 12)] diff --git a/FWPopupView/FWDateView.swift b/FWPopupView/FWDateView.swift index 84dd995..d111b1f 100644 --- a/FWPopupView/FWDateView.swift +++ b/FWPopupView/FWDateView.swift @@ -60,31 +60,30 @@ extension FWDateView { private func setupUI(confirmBlock: FWDateViewConfirmBlock? = nil, cancelBlock: FWPopupVoidBlock? = nil) { let property = self.vProperty as! FWDateViewProperty + property.popupCustomAlignment = .bottomCenter + property.popupAnimationType = .position + + self.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: property.datePickerHeight + property.btnHeight) if #available(iOS 13.4, *) { self.datePicker.preferredDatePickerStyle = .wheels } - 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.datePicker.frame = CGRect(x: 0, y: property.btnHeight, width: self.frame.width, height: property.datePickerHeight) + self.datePicker.backgroundColor = self.backgroundColor + self.datePicker.locale = Locale(identifier: "zh_Hans_CN") + self.datePicker.setValue(UIColor.fw_colorWithStyleColors(lightColor: property.pickerTextColor, darkColor: property.dark_pickerTextColor), forKey: "textColor") + self.addSubview(self.datePicker) + // 取消按钮 self.cancelBtn = self.setupBtn(frame: CGRect(x: 0, y: 0, width: property.btnWidth, height: property.btnHeight), title: property.cancelBtnTitle, tag: 0) self.addSubview(self.cancelBtn!) + // 确定按钮 self.confirmBtn = self.setupBtn(frame: CGRect(x: self.frame.width - property.btnWidth, y: 0, width: property.btnWidth, height: property.btnHeight), title: property.confirmBtnTitle, tag: 1) self.addSubview(self.confirmBtn!) - self.datePicker.frame = CGRect(x: 0, y: property.btnHeight, width: self.frame.width, height: property.datePickerHeight) - self.datePicker.backgroundColor = self.backgroundColor - // 默认 - self.datePicker.locale = Locale(identifier: "zh_Hans_CN") - self.addSubview(self.datePicker) - self.confirmBlock = confirmBlock self.cancelBlock = cancelBlock - - property.popupCustomAlignment = .bottomCenter - property.popupAnimationType = .position } private func setupBtn(frame: CGRect, title: String, tag: Int) -> UIButton { @@ -96,8 +95,8 @@ extension FWDateView { btn.frame = frame btn.tag = tag btn.setTitle(title, for: .normal) - btn.setTitleColor(property.btnTitleColor, for: .normal) - btn.backgroundColor = self.backgroundColor + btn.setTitleColor(UIColor.fw_colorWithStyleColors(lightColor: property.btnTitleColor, darkColor: property.dark_btnTitleColor), for: .normal) + btn.backgroundColor = UIColor.clear btn.titleLabel?.font = UIFont.systemFont(ofSize: property.btnTitleFont) return btn } @@ -136,6 +135,15 @@ open class FWDateViewProperty : FWPopupViewProperty { // 确定按钮名称 @objc public var confirmBtnTitle = "确定" + + // ===== 深色模式 ===== + + // 时间选择器文字颜色 + @objc public var dark_pickerTextColor: UIColor = kPV_RGBA(r: 213, g: 213, b: 213, a: 1) + // 按钮文字颜色 + @objc public var dark_btnTitleColor: UIColor = kPV_RGBA(r: 213, g: 213, b: 213, a: 1) + + public override func reSetParams() { super.reSetParams() diff --git a/FWPopupView/FWMenuView.swift b/FWPopupView/FWMenuView.swift index bbbb801..aa9e88d 100644 --- a/FWPopupView/FWMenuView.swift +++ b/FWPopupView/FWMenuView.swift @@ -200,7 +200,11 @@ extension FWMenuView { self.tableView.separatorInset = property.separatorInset self.tableView.layoutMargins = property.separatorInset - self.tableView.separatorColor = property.separatorColor + if self.vProperty.backgroundLayerColors == nil { + self.tableView.separatorColor = UIColor.fw_colorWithStyleColors(lightColor: property.separatorColor, darkColor: property.dark_separatorColor) + } else { + self.tableView.separatorColor = property.separatorColor + } self.tableView.bounces = property.bounces self.maxItemSize = self.measureMaxSize() @@ -209,7 +213,7 @@ extension FWMenuView { var tableViewY: CGFloat = 0 if property.popupArrowStyle == .none { self.layer.cornerRadius = self.vProperty.cornerRadius - self.layer.borderColor = self.vProperty.splitColor.cgColor + self.layer.borderColor = UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.splitColor, darkColor: self.vProperty.dark_splitColor).cgColor self.layer.borderWidth = self.vProperty.splitWidth } else { tableViewY = property.popupArrowSize.height @@ -379,10 +383,26 @@ extension FWMenuView { self.borderLayer?.path = maskPath.cgPath self.borderLayer?.lineWidth = 1 self.borderLayer?.fillColor = UIColor.clear.cgColor - self.borderLayer?.strokeColor = property.splitColor.cgColor + self.borderLayer?.strokeColor = UIColor.fw_colorWithStyleColors(lightColor: property.splitColor, darkColor: property.dark_splitColor).cgColor self.layer.addSublayer(self.borderLayer!) } } + + open override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { + super.traitCollectionDidChange(previousTraitCollection) + + if #available(iOS 13.0, *), FWPopupSWindow.sharedInstance.compatibleDarkStyle == true { + if self.traitCollection.hasDifferentColorAppearance(comparedTo: previousTraitCollection) { + if self.traitCollection.userInterfaceStyle == .dark { + self.layer.borderColor = self.vProperty.dark_splitColor.cgColor + self.borderLayer?.strokeColor = self.vProperty.dark_splitColor.cgColor + } else { + self.layer.borderColor = self.vProperty.splitColor.cgColor + self.borderLayer?.strokeColor = self.vProperty.splitColor.cgColor + } + } + } + } } extension FWMenuView { @@ -520,6 +540,8 @@ open class FWMenuViewProperty: FWPopupViewProperty { /// 分割线颜色 @objc public var separatorColor: UIColor = kPV_RGBA(r: 231, g: 231, b: 231, a: 1) + /// 深色模式:分割线颜色 + @objc public var dark_separatorColor: UIColor = kPV_RGBA(r: 55, g: 55, b: 55, a: 1) /// 分割线偏移量 @objc public var separatorInset: UIEdgeInsets = UIEdgeInsets.zero @@ -534,7 +556,7 @@ open class FWMenuViewProperty: FWPopupViewProperty { public override func reSetParams() { super.reSetParams() - self.titleTextAttributes = [NSAttributedString.Key.foregroundColor: self.itemNormalColor, NSAttributedString.Key.backgroundColor: UIColor.clear, NSAttributedString.Key.font: UIFont.systemFont(ofSize: self.buttonFontSize)] + self.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.fw_colorWithStyleColors(lightColor: self.itemNormalColor, darkColor: self.dark_itemNormalColor), NSAttributedString.Key.backgroundColor: UIColor.clear, NSAttributedString.Key.font: UIFont.systemFont(ofSize: self.buttonFontSize)] self.letfRigthMargin = 20 diff --git a/FWPopupView/FWPColorCategory.swift b/FWPopupView/FWPColorCategory.swift new file mode 100644 index 0000000..75f2297 --- /dev/null +++ b/FWPopupView/FWPColorCategory.swift @@ -0,0 +1,35 @@ +// +// FWPColorCategory.swift +// FWPopupView +// +// Created by xfg on 2021/3/17. +// Copyright © 2021 xfg. All rights reserved. +// + +import Foundation +import UIKit + +public func kPV_RGBA (r:CGFloat, g:CGFloat, b:CGFloat, a:CGFloat) -> UIColor { + return UIColor (red: r/255.0, green: g/255.0, blue: b/255.0, alpha: a) +} + +extension UIColor { + /// 适配暗黑模式:设置颜色方法 + /// - Parameters: + /// - lightColor: 浅色模式颜色 + /// - darkColor: 深色模式颜色 + /// - Returns: 颜色 + open class func fw_colorWithStyleColors(lightColor: UIColor?, darkColor: UIColor?) -> UIColor { + if #available(iOS 13.0, *), FWPopupSWindow.sharedInstance.compatibleDarkStyle == true { + return UIColor.init { (tc: UITraitCollection) -> UIColor in + if tc.userInterfaceStyle == .light { + return (lightColor != nil) ? lightColor! : ((darkColor != nil) ? darkColor! : UIColor.clear) + } else { + return (darkColor != nil) ? darkColor! : ((lightColor != nil) ? lightColor! : UIColor.clear) + } + } + } else { + return (lightColor != nil) ? lightColor! : ((darkColor != nil) ? darkColor! : UIColor.clear) + } + } +} diff --git a/FWPopupView/FWPopupItem.swift b/FWPopupView/FWPopupItem.swift index f022248..a6f5d7c 100644 --- a/FWPopupView/FWPopupItem.swift +++ b/FWPopupView/FWPopupItem.swift @@ -39,22 +39,27 @@ open class FWPopupItem: NSObject { /// 是否不可点击 @objc open var disabled = false - /// 按钮文字颜色 - @objc open var itemTitleColor: UIColor? /// 按钮文字大小 @objc open var itemTitleFont: UIFont? + /// 按钮文字颜色 + @objc open var itemTitleColor: UIColor? /// 按钮背景颜色 @objc open var itemBackgroundColor: UIColor? + /// 深色模式:按钮文字颜色 + @objc open var dark_itemTitleColor: UIColor? + /// 深色模式:按钮背景颜色 + @objc open var dark_itemBackgroundColor: UIColor? + /// 标题 - @objc open var title: String + @objc open var title: String = "" /// 按钮类型 - @objc open var itemType: FWItemType + @objc open var itemType: FWItemType = .normal /// 是否取消按钮 - @objc open var isCancel: Bool + @objc open var isCancel: Bool = false /// 点击该按钮后会自动隐藏弹窗 - @objc open var canAutoHide: Bool + @objc open var canAutoHide: Bool = false /// 点击按钮回调 @objc open var itemClickedBlock: FWPopupItemClickedBlock? @@ -68,16 +73,9 @@ open class FWPopupItem: NSObject { /// - canAutoHide: 点击该按钮后会自动隐藏弹窗 /// - itemClickedBlock: 点击回调 @objc public init(title: String, itemType: FWItemType, isCancel: Bool, canAutoHide: Bool, itemClickedBlock: FWPopupItemClickedBlock? = nil) { - - self.title = title - self.itemType = itemType - self.isCancel = isCancel - self.canAutoHide = canAutoHide - self.itemClickedBlock = itemClickedBlock - super.init() - self.setupItemType(itemType: itemType) + self.setupParams(title: title, itemType: itemType, isCancel: isCancel, canAutoHide: canAutoHide, itemTitleColor: nil, itemTitleFont: nil, itemBackgroundColor: nil, itemClickedBlock: itemClickedBlock) } /// 初始化方法2 @@ -91,18 +89,9 @@ open class FWPopupItem: NSObject { /// - itemBackgroundColor: 按钮背景颜色 /// - itemClickedBlock: 点击回调 @objc public init(title: String, itemType: FWItemType, isCancel: Bool, canAutoHide: Bool, itemTitleColor: UIColor?, itemBackgroundColor: UIColor?, itemClickedBlock: FWPopupItemClickedBlock? = nil) { - - self.title = title - self.itemType = itemType - self.isCancel = isCancel - self.canAutoHide = canAutoHide - self.itemTitleColor = itemTitleColor - self.itemBackgroundColor = itemBackgroundColor - self.itemClickedBlock = itemClickedBlock - super.init() - self.setupItemType(itemType: itemType) + self.setupParams(title: title, itemType: itemType, isCancel: isCancel, canAutoHide: canAutoHide, itemTitleColor: itemTitleColor, itemTitleFont: nil, itemBackgroundColor: itemBackgroundColor, itemClickedBlock: itemClickedBlock) } /// 初始化方法3 @@ -117,7 +106,12 @@ open class FWPopupItem: NSObject { /// - itemBackgroundColor: 按钮背景颜色 /// - itemClickedBlock: 点击回调 @objc public init(title: String, itemType: FWItemType, isCancel: Bool, canAutoHide: Bool, itemTitleColor: UIColor?, itemTitleFont: UIFont?, itemBackgroundColor: UIColor?, itemClickedBlock: FWPopupItemClickedBlock? = nil) { + super.init() + self.setupParams(title: title, itemType: itemType, isCancel: isCancel, canAutoHide: canAutoHide, itemTitleColor: itemTitleColor, itemTitleFont: itemTitleFont, itemBackgroundColor: itemBackgroundColor, itemClickedBlock: itemClickedBlock) + } + + private func setupParams(title: String, itemType: FWItemType, isCancel: Bool, canAutoHide: Bool, itemTitleColor: UIColor?, itemTitleFont: UIFont?, itemBackgroundColor: UIColor?, itemClickedBlock: FWPopupItemClickedBlock? = nil) { self.title = title self.itemType = itemType self.isCancel = isCancel @@ -127,8 +121,6 @@ open class FWPopupItem: NSObject { self.itemBackgroundColor = itemBackgroundColor self.itemClickedBlock = itemClickedBlock - super.init() - self.setupItemType(itemType: itemType) } diff --git a/FWPopupView/FWPopupSWindow.swift b/FWPopupView/FWPopupSWindow.swift index 5088743..8d6399a 100644 --- a/FWPopupView/FWPopupSWindow.swift +++ b/FWPopupView/FWPopupSWindow.swift @@ -18,10 +18,6 @@ import Foundation import UIKit -public func kPV_RGBA (r:CGFloat, g:CGFloat, b:CGFloat, a:CGFloat) -> UIColor { - return UIColor (red: r/255.0, green: g/255.0, blue: b/255.0, alpha: a) -} - open class FWPopupSWindow: UIWindow, UIGestureRecognizerDelegate { /// 单例模式 @@ -42,6 +38,8 @@ open class FWPopupSWindow: UIWindow, UIGestureRecognizerDelegate { @objc open var touchWildToHide: Bool = false // 默认false,当为true时:用户拖动外部遮罩层页面可以消失 @objc open var panWildToHide: Bool = false + // 当为true时:兼容深色模式 + @objc open var compatibleDarkStyle: Bool = true /// 被隐藏的视图队列(A视图正在显示,接着B视图显示,此时就把A视图隐藏同时放入该队列) open var hiddenViews: [UIView] = [] @@ -52,6 +50,8 @@ open class FWPopupSWindow: UIWindow, UIGestureRecognizerDelegate { public override init(frame: CGRect) { super.init(frame: frame) + self.backgroundColor = .clear + let rootVC = FWPopupRootViewController() rootVC.view.backgroundColor = UIColor.clear self.rootViewController = rootVC diff --git a/FWPopupView/FWPopupView.swift b/FWPopupView/FWPopupView.swift index 1f71a46..e555990 100644 --- a/FWPopupView/FWPopupView.swift +++ b/FWPopupView/FWPopupView.swift @@ -135,9 +135,10 @@ open class FWPopupView: UIView, UIGestureRecognizerDelegate { @objc public var vProperty = FWPopupViewProperty() { willSet { self.attachedView?.fwAnimationDuration = newValue.animationDuration - if newValue.backgroundColor != nil { - self.backgroundColor = newValue.backgroundColor - } else if newValue.backgroundLayerColors != nil { + + self.backgroundColor = UIColor.fw_colorWithStyleColors(lightColor: newValue.backgroundColor, darkColor: newValue.dark_backgroundColor) + + if newValue.backgroundLayerColors != nil { var tmpArray: [Any] = [] for color: UIColor in newValue.backgroundLayerColors! { tmpArray.append(color.cgColor as Any) @@ -216,9 +217,8 @@ open class FWPopupView: UIView, UIGestureRecognizerDelegate { } private func setupParams() { - self.backgroundColor = UIColor.white - FWPopupSWindow.sharedInstance.backgroundColor = UIColor.clear + self.backgroundColor = UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.backgroundColor, darkColor: self.vProperty.dark_backgroundColor) self.originMaskViewColor = self.attachedView?.fwMaskViewColor self.originTouchWildToHide = FWPopupSWindow.sharedInstance.touchWildToHide @@ -1057,8 +1057,8 @@ open class FWPopupViewProperty: NSObject { /// 圆角值 @objc open var cornerRadius: CGFloat = 5.0 - /// 弹窗的背景色(注意:这边指的是弹窗而不是遮罩层,遮罩层背景色的设置是:fwMaskViewColor) - @objc open var backgroundColor: UIColor? + /// 弹窗的背景色(注意:部分子类有重新定义该背景色。这边指的是弹窗而不是遮罩层,遮罩层背景色的设置是:fwMaskViewColor) + @objc open var backgroundColor: UIColor = UIColor.white /// 弹窗的背景渐变色:当未设置backgroundColor时该值才有效 @objc open var backgroundLayerColors: [UIColor]? /// 弹窗的背景渐变色相关属性:当设置了backgroundLayerColors时该值才有效 @@ -1083,6 +1083,22 @@ open class FWPopupViewProperty: NSObject { @objc open var popupArrowBottomCornerRadius: CGFloat = 4.0 + // ===== 深色模式 ===== + + /// 深色模式:弹窗的背景色 + @objc open var dark_backgroundColor: UIColor = kPV_RGBA(r: 44, g: 44, b: 44, a: 1) + /// 深色模式:标题文字颜色 + @objc open var dark_titleColor: UIColor = kPV_RGBA(r: 213, g: 213, b: 213, a: 1) + /// 深色模式:普通按钮文字颜色 + @objc open var dark_itemNormalColor: UIColor = kPV_RGBA(r: 213, g: 213, b: 213, a: 1) + /// 深色模式:高亮按钮文字颜色 + @objc open var dark_itemHighlightColor: UIColor = kPV_RGBA(r: 254, g: 226, b: 4, a: 1) + /// 深色模式:选中按钮文字颜色 + @objc open var dark_itemPressedColor: UIColor = kPV_RGBA(r: 50, g: 50, b: 50, a: 1) + /// 深色模式:边框颜色(部分控件分割线也用这个颜色) + @objc open var dark_splitColor: UIColor = kPV_RGBA(r: 55, g: 55, b: 55, a: 1) + + // ===== 自定义弹窗(继承FWPopupView)时可能会用到 ===== /// 弹窗校准位置 @@ -1107,7 +1123,7 @@ open class FWPopupViewProperty: NSObject { /// 3D放射动画(当且仅当:popupAnimationType == .scale3D 时有效) @objc open var transform3D: CATransform3D = CATransform3DMakeScale(1.2, 1.2, 1.0) /// 2D放射动画 - @objc open var transform: CGAffineTransform = CGAffineTransform(scaleX: 0.001, y: 0.001) + @objc open var transform: CGAffineTransform = CGAffineTransform(scaleX: 0.001, y: 0.001) public override init() { diff --git a/FWPopupView/FWRadioButton.swift b/FWPopupView/FWRadioButton.swift index 7157f89..dc0602c 100644 --- a/FWPopupView/FWRadioButton.swift +++ b/FWPopupView/FWRadioButton.swift @@ -49,7 +49,7 @@ open class FWRadioButton : UIView { let insideLayer = CAShapeLayer() self.layer.addSublayer(insideLayer) insideLayer.lineWidth = 0 - insideLayer.fillColor = self.vProperty.selectedStateColor.cgColor + insideLayer.fillColor = UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.selectedStateColor, darkColor: self.vProperty.dark_selectedStateColor).cgColor insideLayer.anchorPoint = CGPoint(x: 0.5, y: 0.5) return insideLayer }() @@ -181,7 +181,7 @@ extension FWRadioButton { if title != nil && !title!.isEmpty { self.titleLabel.font = self.vProperty.titleFont - self.titleLabel.textColor = self.vProperty.titleColor + self.titleLabel.textColor = UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.titleColor, darkColor: self.vProperty.dark_titleColor) self.titleLabel.text = title self.titleLabel.snp.makeConstraints { (make) in make.left.equalTo(self).offset(radioFrame.width + self.vProperty.radioViewEdgeInsets.left + self.vProperty.radioViewEdgeInsets.right) @@ -190,6 +190,22 @@ extension FWRadioButton { } } + open override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { + super.traitCollectionDidChange(previousTraitCollection) + + if #available(iOS 13.0, *), FWPopupSWindow.sharedInstance.compatibleDarkStyle == true { + if self.traitCollection.hasDifferentColorAppearance(comparedTo: previousTraitCollection) { + if self.traitCollection.userInterfaceStyle == .dark { + self.borderLayer.strokeColor = self.vProperty.dark_normalStateColor.cgColor + self.insideLayer.fillColor = self.vProperty.dark_selectedStateColor.cgColor + } else { + self.borderLayer.strokeColor = self.vProperty.normalStateColor.cgColor + self.insideLayer.fillColor = self.vProperty.selectedStateColor.cgColor + } + } + } + } + /// 点击手势 /// /// - Parameter tap: 手势 @@ -223,7 +239,7 @@ extension FWRadioButton { } } else { if self.vProperty.isBorderColorNeedChanged { - self.borderLayer.strokeColor = selected ? self.vProperty.selectedStateColor.cgColor : self.vProperty.normalStateColor.cgColor + self.borderLayer.strokeColor = selected ? UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.selectedStateColor, darkColor: self.vProperty.dark_selectedStateColor).cgColor : UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.normalStateColor, darkColor: self.vProperty.dark_normalStateColor).cgColor } if self.vProperty.isAnimated && self.vProperty.animationDuration > 0 { @@ -272,7 +288,7 @@ extension FWRadioButton { } self.borderLayer.frame = CGRect(x: rect.origin.x, y: rect.origin.y, width: rect.width, height: rect.height) - self.borderLayer.strokeColor = self.vProperty.normalStateColor.cgColor + self.borderLayer.strokeColor = UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.normalStateColor, darkColor: self.vProperty.dark_normalStateColor).cgColor self.borderLayer.path = borderPath.cgPath } @@ -341,6 +357,8 @@ open class FWRadioButtonProperty: NSObject { @objc open var titleFont: UIFont = UIFont.systemFont(ofSize: 15.0) /// 标题文字颜色 @objc open var titleColor: UIColor = kPV_RGBA(r: 51, g: 51, b: 51, a: 1) + /// 深色模式:标题文字颜色 + @objc open var dark_titleColor: UIColor = kPV_RGBA(r: 213, g: 213, b: 213, a: 1) // ------------ 以下属性为:buttonType == .circular | .rectangle 时有效 ------------ @@ -348,6 +366,10 @@ open class FWRadioButtonProperty: NSObject { @objc open var normalStateColor: UIColor = kPV_RGBA(r: 51, g: 51, b: 51, a: 1) /// 选中时的颜色 @objc open var selectedStateColor: UIColor = kPV_RGBA(r: 51, g: 51, b: 51, a: 1) + /// 深色模式:未选中时的颜色 + @objc open var dark_normalStateColor: UIColor = UIColor.white + /// 深色模式:选中时的颜色 + @objc open var dark_selectedStateColor: UIColor = UIColor.white /// 边框颜色是否需要跟随选中颜色 @objc public var isBorderColorNeedChanged : Bool = true /// 边的宽度 diff --git a/FWPopupView/FWSheetView.swift b/FWPopupView/FWSheetView.swift index 0ab63e1..b2919f2 100644 --- a/FWPopupView/FWSheetView.swift +++ b/FWPopupView/FWSheetView.swift @@ -24,8 +24,7 @@ open class FWSheetView: FWPopupView { private var titleLabel: UILabel? private var titleContainerView: UIView? - - private var commponenetArray: [UIView] = [] + private var btnContrainerView: UIScrollView! /// 类初始化方法1 /// @@ -75,7 +74,7 @@ open class FWSheetView: FWPopupView { super.init(frame: frame) self.vProperty = FWSheetViewProperty() - self.backgroundColor = self.vProperty.backgroundColor + self.backgroundColor = UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.backgroundColor, darkColor: self.vProperty.dark_backgroundColor) } required public init?(coder aDecoder: NSCoder) { @@ -120,7 +119,7 @@ extension FWSheetView { self.titleContainerView?.snp.makeConstraints({ (make) in make.top.left.right.equalTo(self) }) - self.titleContainerView?.backgroundColor = UIColor.white + self.titleContainerView?.backgroundColor = UIColor.fw_colorWithStyleColors(lightColor: property.itemDefaultBackgroundColor, darkColor: property.dark_itemDefaultBackgroundColor) self.titleLabel = UILabel() self.titleContainerView?.addSubview(self.titleLabel!) @@ -128,19 +127,17 @@ extension FWSheetView { make.edges.equalToSuperview().inset(UIEdgeInsets(top: round(self.vProperty.topBottomMargin*1.5), left: self.vProperty.letfRigthMargin, bottom: round(self.vProperty.topBottomMargin*1.5), right: self.vProperty.letfRigthMargin)) }) self.titleLabel?.text = title - self.titleLabel?.textColor = self.vProperty.titleColor + self.titleLabel?.textColor = UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.titleColor, darkColor: self.vProperty.dark_titleColor) self.titleLabel?.textAlignment = .center self.titleLabel?.font = (self.vProperty.titleFont != nil) ? self.vProperty.titleFont! : UIFont.systemFont(ofSize: self.vProperty.titleFontSize) self.titleLabel?.numberOfLines = 10 self.titleLabel?.backgroundColor = UIColor.clear - self.commponenetArray.append(self.titleLabel!) - lastConstraintItem = self.titleContainerView!.snp.bottom } // 开始配置Item - let btnContrainerView = UIScrollView() + btnContrainerView = UIScrollView() self.addSubview(btnContrainerView) btnContrainerView.bounces = false btnContrainerView.backgroundColor = UIColor.clear @@ -155,7 +152,10 @@ extension FWSheetView { } } - self.actionItemArray.append(FWPopupItem(title: (cancelItemTitle != nil) ? cancelItemTitle! : property.cancelItemTitle, itemType: .normal, isCancel: true, canAutoHide: true, itemTitleColor: property.cancelItemTitleColor, itemTitleFont: property.cancelItemTitleFont, itemBackgroundColor: property.cancelItemBackgroundColor, itemClickedBlock: block)) + let cancelItem = FWPopupItem(title: (cancelItemTitle != nil) ? cancelItemTitle! : property.cancelItemTitle, itemType: .normal, isCancel: true, canAutoHide: true, itemTitleColor: property.cancelItemTitleColor, itemTitleFont: property.cancelItemTitleFont, itemBackgroundColor: property.cancelItemBackgroundColor, itemClickedBlock: block) + cancelItem.dark_itemTitleColor = property.dark_cancelItemTitleColor + cancelItem.dark_itemBackgroundColor = property.dark_cancelItemBackgroundColor + self.actionItemArray.append(cancelItem) var tmpIndex = 0 var lastBtn: UIButton! @@ -164,6 +164,7 @@ extension FWSheetView { for popupItem: FWPopupItem in self.actionItemArray { let btn = UIButton(type: .custom) + btn.tag = tmpIndex + 1 if tmpIndex == self.actionItemArray.count - 1 { self.addSubview(btn) cancelBtn = btn @@ -188,29 +189,28 @@ extension FWSheetView { } // 按钮标题 btn.setTitle(popupItem.title, for: .normal) - // 按钮标题字体颜色 - if popupItem.itemTitleColor != nil { - btn.setTitleColor(popupItem.itemTitleColor, for: .normal) - } else { - btn.setTitleColor(popupItem.highlight ? self.vProperty.itemHighlightColor : self.vProperty.itemNormalColor, for: .normal) - } // 按钮标题字体大小 if popupItem.itemTitleFont != nil { btn.titleLabel?.font = popupItem.itemTitleFont } else { btn.titleLabel?.font = (self.vProperty.buttonFont != nil) ? self.vProperty.buttonFont! : UIFont.systemFont(ofSize: self.vProperty.buttonFontSize) } + + // 按钮标题字体颜色 + let titleLightColor = (popupItem.itemTitleColor != nil) ? popupItem.itemTitleColor : ((popupItem.highlight == true) ? self.vProperty.itemHighlightColor : self.vProperty.itemNormalColor) + let titleDarkColor = (popupItem.dark_itemTitleColor != nil) ? popupItem.dark_itemTitleColor : ((popupItem.highlight == true) ? self.vProperty.dark_itemHighlightColor : self.vProperty.dark_itemNormalColor) + btn.setTitleColor(UIColor.fw_colorWithStyleColors(lightColor: titleLightColor, darkColor: titleDarkColor), for: .normal) + + let nBGLightColor = (popupItem.itemBackgroundColor != nil) ? popupItem.itemBackgroundColor : property.itemDefaultBackgroundColor + let nBGDarkColor = (popupItem.dark_itemBackgroundColor != nil) ? popupItem.dark_itemBackgroundColor : property.dark_itemDefaultBackgroundColor + btn.backgroundColor = UIColor.fw_colorWithStyleColors(lightColor: nBGLightColor, darkColor: nBGDarkColor) // 按钮背景颜色 - if popupItem.itemBackgroundColor != nil { - btn.setBackgroundImage(self.getImageWithColor(color: popupItem.itemBackgroundColor!), for: .normal) - } else { - btn.setBackgroundImage(self.getImageWithColor(color: UIColor.white), for: .normal) - } + btn.setBackgroundImage(self.getImageWithColor(color: UIColor.fw_colorWithStyleColors(lightColor: nBGLightColor, darkColor: nBGDarkColor)), for: .normal) // 按钮选中高亮颜色 - btn.setBackgroundImage(self.getImageWithColor(color: self.vProperty.itemPressedColor), for: .highlighted) + btn.setBackgroundImage(self.getImageWithColor(color: UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.itemPressedColor, darkColor: self.vProperty.dark_itemPressedColor)), for: .highlighted) btn.layer.borderWidth = self.vProperty.splitWidth - btn.layer.borderColor = self.vProperty.splitColor.cgColor + btn.layer.borderColor = UIColor.fw_colorWithStyleColors(lightColor: self.vProperty.splitColor, darkColor: self.vProperty.dark_splitColor).cgColor tmpIndex += 1 } @@ -237,6 +237,30 @@ extension FWSheetView { } } } + + open override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { + super.traitCollectionDidChange(previousTraitCollection) + + if #available(iOS 13.0, *), FWPopupSWindow.sharedInstance.compatibleDarkStyle == true { + if self.traitCollection.hasDifferentColorAppearance(comparedTo: previousTraitCollection) { + var tmpArray: [UIView] = self.subviews + tmpArray.append(contentsOf: btnContrainerView.subviews) + for tmpView: UIView in tmpArray { + if tmpView.isMember(of: UIButton.self) { + let btn: UIButton = tmpView as! UIButton + btn.setBackgroundImage(self.getImageWithColor(color: btn.backgroundColor!), for: .normal) + if self.traitCollection.userInterfaceStyle == .dark { + btn.layer.borderColor = self.vProperty.dark_splitColor.cgColor + btn.setBackgroundImage(self.getImageWithColor(color: self.vProperty.dark_itemPressedColor), for: .highlighted) + } else { + btn.layer.borderColor = self.vProperty.splitColor.cgColor + btn.setBackgroundImage(self.getImageWithColor(color: self.vProperty.itemPressedColor), for: .highlighted) + } + } + } + } + } + } } extension FWSheetView { @@ -266,16 +290,28 @@ open class FWSheetViewProperty: FWPopupViewProperty { @objc public var cancelBtnMarginTop: CGFloat = 6 // 取消按钮名称 @objc public var cancelItemTitle = "取消" - // 取消按钮字体颜色 - @objc public var cancelItemTitleColor: UIColor? // 取消按钮字体大小 @objc public var cancelItemTitleFont: UIFont? + // 取消按钮字体颜色 + @objc public var cancelItemTitleColor: UIColor? // 取消按钮背景颜色 @objc public var cancelItemBackgroundColor: UIColor? + // 按钮默认背景颜色(如果FWPopupItem设置了背景色会覆盖该值) + @objc public var itemDefaultBackgroundColor: UIColor = UIColor.white + + + // ===== 深色模式 ===== + // 按钮默认背景颜色 + @objc public var dark_itemDefaultBackgroundColor: UIColor = kPV_RGBA(r: 44, g: 44, b: 44, a: 1) + // 取消按钮字体颜色 + @objc public var dark_cancelItemTitleColor: UIColor? + // 取消按钮背景颜色 + @objc public var dark_cancelItemBackgroundColor: UIColor? public override func reSetParams() { super.reSetParams() self.backgroundColor = kPV_RGBA(r: 230, g: 230, b: 230, a: 1) + self.dark_backgroundColor = kPV_RGBA(r: 31, g: 31, b: 31, a: 1) } } diff --git a/FWPopupViewSwiftDemo/FWPopupView.xcodeproj/project.pbxproj b/FWPopupViewSwiftDemo/FWPopupView.xcodeproj/project.pbxproj index a3465e8..555ccd9 100644 --- a/FWPopupViewSwiftDemo/FWPopupView.xcodeproj/project.pbxproj +++ b/FWPopupViewSwiftDemo/FWPopupView.xcodeproj/project.pbxproj @@ -32,6 +32,7 @@ 49F7A85D2214106B002267FD /* FWPopupViewUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49F7A85C2214106B002267FD /* FWPopupViewUITests.swift */; }; 49F7A88C221411B5002267FD /* FWPopupViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49F7A88B221411B5002267FD /* FWPopupViewTests.swift */; }; 56B3717CE2F2FC8C487C2BB0 /* libPods-FWPopupView.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D859FC06A597D0EEFB02CB7 /* libPods-FWPopupView.a */; }; + AF6C51A32601F0EE001F236A /* FWPColorCategory.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF6C51A22601F0EE001F236A /* FWPColorCategory.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -85,6 +86,7 @@ 49F7A88D221411B5002267FD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 5D859FC06A597D0EEFB02CB7 /* libPods-FWPopupView.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-FWPopupView.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 7C6363DF5ABBB1DEAF568394 /* Pods-FWPopupView.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FWPopupView.debug.xcconfig"; path = "Target Support Files/Pods-FWPopupView/Pods-FWPopupView.debug.xcconfig"; sourceTree = ""; }; + AF6C51A22601F0EE001F236A /* FWPColorCategory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FWPColorCategory.swift; sourceTree = ""; }; E68A3B6EB8B1506E0B09A7B8 /* Pods_FWPopupViewUITests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FWPopupViewUITests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; FAB7438A54E83AA546D1BB16 /* Pods_FWPopupViewTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FWPopupViewTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -135,6 +137,7 @@ 49630491247E4215006B121E /* FWDateView.swift */, 49630492247E4215006B121E /* FWMenuView.swift */, 4963048B247E4215006B121E /* FWPopupCategory.swift */, + AF6C51A22601F0EE001F236A /* FWPColorCategory.swift */, 4963048F247E4215006B121E /* FWPopupItem.swift */, 49630486247E4215006B121E /* FWPopupRootViewController.swift */, 49630488247E4215006B121E /* FWRadioButton.swift */, @@ -420,6 +423,7 @@ 49552D3D20B56C24000A1FA6 /* FWCustomPopupView.swift in Sources */, 49630496247E4215006B121E /* FWSheetView.swift in Sources */, 49630497247E4215006B121E /* FWPopupSWindow.swift in Sources */, + AF6C51A32601F0EE001F236A /* FWPColorCategory.swift in Sources */, 495AC10120688B3B002773F9 /* FWDemoViewController.swift in Sources */, 49630499247E4215006B121E /* FWCustomSheetView.swift in Sources */, 49630495247E4215006B121E /* FWRadioButton.swift in Sources */, diff --git a/FWPopupViewSwiftDemo/FWPopupView.xcodeproj/xcuserdata/xfg.xcuserdatad/xcschemes/xcschememanagement.plist b/FWPopupViewSwiftDemo/FWPopupView.xcodeproj/xcuserdata/xfg.xcuserdatad/xcschemes/xcschememanagement.plist index 302a84a..0ed1bcd 100644 --- a/FWPopupViewSwiftDemo/FWPopupView.xcodeproj/xcuserdata/xfg.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/FWPopupViewSwiftDemo/FWPopupView.xcodeproj/xcuserdata/xfg.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,7 +7,7 @@ FWPopupView.xcscheme_^#shared#^_ orderHint - 2 + 1 diff --git a/FWPopupViewSwiftDemo/FWPopupView.xcworkspace/xcuserdata/xfg.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/FWPopupViewSwiftDemo/FWPopupView.xcworkspace/xcuserdata/xfg.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..684a780 --- /dev/null +++ b/FWPopupViewSwiftDemo/FWPopupView.xcworkspace/xcuserdata/xfg.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/Color/Contents.json b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/Color/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/Color/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/Color/fw_color_background.colorset/Contents.json b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/Color/fw_color_background.colorset/Contents.json new file mode 100644 index 0000000..3dc9be3 --- /dev/null +++ b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/Color/fw_color_background.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.038", + "green" : "0.426", + "red" : "1.000" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.706", + "green" : "1.000", + "red" : "0.000" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/Contents.json b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/Contents.json index da4a164..73c0059 100644 --- a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/Contents.json +++ b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/Contents.json @@ -1,6 +1,6 @@ { "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/mqz_nav_add.imageset/Contents.json b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/mqz_nav_add.imageset/Contents.json index c9cefbf..caa6206 100644 --- a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/mqz_nav_add.imageset/Contents.json +++ b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/mqz_nav_add.imageset/Contents.json @@ -5,8 +5,8 @@ "scale" : "1x" }, { - "idiom" : "universal", "filename" : "mqz_nav_add@2x.png", + "idiom" : "universal", "scale" : "2x" }, { @@ -15,10 +15,10 @@ } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 }, "properties" : { "template-rendering-intent" : "original" } -} \ No newline at end of file +} diff --git a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_QR.imageset/Contents.json b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_QR.imageset/Contents.json index 5fd893e..ef63b01 100644 --- a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_QR.imageset/Contents.json +++ b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_QR.imageset/Contents.json @@ -4,18 +4,49 @@ "idiom" : "universal", "scale" : "1x" }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "scale" : "1x" + }, { "idiom" : "universal", "scale" : "2x" }, { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], "idiom" : "universal", + "scale" : "2x" + }, + { "filename" : "right_menu_QR@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "right_menu_QR_white@3x.png", + "idiom" : "universal", "scale" : "3x" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_QR.imageset/right_menu_QR_white@3x.png b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_QR.imageset/right_menu_QR_white@3x.png new file mode 100644 index 0000000..af75867 Binary files /dev/null and b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_QR.imageset/right_menu_QR_white@3x.png differ diff --git a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_addFri.imageset/Contents.json b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_addFri.imageset/Contents.json index ae770e6..c34611a 100644 --- a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_addFri.imageset/Contents.json +++ b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_addFri.imageset/Contents.json @@ -4,18 +4,49 @@ "idiom" : "universal", "scale" : "1x" }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "scale" : "1x" + }, { "idiom" : "universal", "scale" : "2x" }, { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], "idiom" : "universal", + "scale" : "2x" + }, + { "filename" : "right_menu_addFri@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "right_menu_addFri_white@3x.png", + "idiom" : "universal", "scale" : "3x" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_addFri.imageset/right_menu_addFri_white@3x.png b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_addFri.imageset/right_menu_addFri_white@3x.png new file mode 100644 index 0000000..845c2d1 Binary files /dev/null and b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_addFri.imageset/right_menu_addFri_white@3x.png differ diff --git a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_facetoface.imageset/Contents.json b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_facetoface.imageset/Contents.json index 270e2c3..1f9bae6 100644 --- a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_facetoface.imageset/Contents.json +++ b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_facetoface.imageset/Contents.json @@ -4,18 +4,49 @@ "idiom" : "universal", "scale" : "1x" }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "scale" : "1x" + }, { "idiom" : "universal", "scale" : "2x" }, { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], "idiom" : "universal", + "scale" : "2x" + }, + { "filename" : "right_menu_facetoface@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "right_menu_facetoface_white@3x.png", + "idiom" : "universal", "scale" : "3x" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_facetoface.imageset/right_menu_facetoface_white@3x.png b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_facetoface.imageset/right_menu_facetoface_white@3x.png new file mode 100644 index 0000000..83cddda Binary files /dev/null and b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_facetoface.imageset/right_menu_facetoface_white@3x.png differ diff --git a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_multichat.imageset/Contents.json b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_multichat.imageset/Contents.json index f7f64d6..7b50865 100644 --- a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_multichat.imageset/Contents.json +++ b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_multichat.imageset/Contents.json @@ -4,18 +4,49 @@ "idiom" : "universal", "scale" : "1x" }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "scale" : "1x" + }, { "idiom" : "universal", "scale" : "2x" }, { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], "idiom" : "universal", + "scale" : "2x" + }, + { "filename" : "right_menu_multichat@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "right_menu_multichat_white@3x.png", + "idiom" : "universal", "scale" : "3x" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_multichat.imageset/right_menu_multichat_white@3x.png b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_multichat.imageset/right_menu_multichat_white@3x.png new file mode 100644 index 0000000..14796dd Binary files /dev/null and b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_multichat.imageset/right_menu_multichat_white@3x.png differ diff --git a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_payMoney.imageset/Contents.json b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_payMoney.imageset/Contents.json index 97362b2..6b9f7e4 100644 --- a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_payMoney.imageset/Contents.json +++ b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_payMoney.imageset/Contents.json @@ -4,18 +4,49 @@ "idiom" : "universal", "scale" : "1x" }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "scale" : "1x" + }, { "idiom" : "universal", "scale" : "2x" }, { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], "idiom" : "universal", + "scale" : "2x" + }, + { "filename" : "right_menu_payMoney@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "right_menu_payMoney_white@3x.png", + "idiom" : "universal", "scale" : "3x" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_payMoney.imageset/right_menu_payMoney_white@3x.png b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_payMoney.imageset/right_menu_payMoney_white@3x.png new file mode 100644 index 0000000..95c3bd4 Binary files /dev/null and b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_payMoney.imageset/right_menu_payMoney_white@3x.png differ diff --git a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_sendvideo.imageset/Contents.json b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_sendvideo.imageset/Contents.json index 92c3e33..bf401fd 100644 --- a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_sendvideo.imageset/Contents.json +++ b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_sendvideo.imageset/Contents.json @@ -4,18 +4,49 @@ "idiom" : "universal", "scale" : "1x" }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "scale" : "1x" + }, { "idiom" : "universal", "scale" : "2x" }, { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], "idiom" : "universal", + "scale" : "2x" + }, + { "filename" : "right_menu_sendvideo@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "right_menu_sendvideo_white@3x.png", + "idiom" : "universal", "scale" : "3x" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_sendvideo.imageset/right_menu_sendvideo_white@3x.png b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_sendvideo.imageset/right_menu_sendvideo_white@3x.png new file mode 100644 index 0000000..c94a224 Binary files /dev/null and b/FWPopupViewSwiftDemo/FWPopupView/Assets.xcassets/right_menu_sendvideo.imageset/right_menu_sendvideo_white@3x.png differ diff --git a/FWPopupViewSwiftDemo/FWPopupView/FWDemoViewController.swift b/FWPopupViewSwiftDemo/FWPopupView/FWDemoViewController.swift index d59465f..06ebd03 100644 --- a/FWPopupViewSwiftDemo/FWPopupView/FWDemoViewController.swift +++ b/FWPopupViewSwiftDemo/FWPopupView/FWDemoViewController.swift @@ -13,7 +13,7 @@ import IQKeyboardManagerSwift class FWDemoViewController: UITableViewController { /// 注意:这边不同的示例可能还附加演示了一些特性(比如:遮罩层是否能够点击、遮罩层的背景颜色等等),有用到时可以参考 - var titleArray = ["0、Alert - 单个按钮", "1、Alert - 两个按钮", "2、Alert - 两个按钮(修改参数)", "3、Alert - 多个按钮", "4、Alert - 带输入框", "5、Alert - 带自定义视图", "6、Sheet - 少量Item", "7、Sheet - 标题+少量Item", "8、Sheet - 大量Item", "9、Date - 自定义日期选择", "10、Menu - 自定义菜单", "11、Custom - 自定义弹窗", "12、CustomSheet - 类似Sheet效果", "13、CustomSheet - 类似Sheet效果2", "14、同时显示两个弹窗(展示可以同时调用多个弹窗的显示方法,但是显示过程按“后来者先显示”的原则,因此过程则反之)", "15、RadioButton", "16、含RadioButton的Alert", "17、xib 方式创建弹窗"] + var titleArray = ["0、Alert - 单个按钮", "1、Alert - 两个按钮", "2、Alert - 两个按钮(演示修改各种配置)", "3、Alert - 多个按钮", "4、Alert - 带输入框", "5、Alert - 带自定义视图", "6、Sheet - 少量Item", "7、Sheet - 标题+少量Item", "8、Sheet - 大量Item", "9、Date - 自定义日期选择", "10、Menu - 自定义菜单", "11、Custom - 自定义弹窗", "12、CustomSheet - 类似Sheet效果", "13、CustomSheet - 类似Sheet效果2", "14、同时显示两个弹窗(展示可以同时调用多个弹窗的显示方法,但是显示过程按“后来者先显示”的原则,隐藏过程则反之)", "15、RadioButton", "16、含RadioButton的Alert", "17、xib 方式创建弹窗"] let block: FWPopupItemClickedBlock = { (popupView, index, title) in print("AlertView:点击了第\(index)个按钮") @@ -127,7 +127,7 @@ class FWDemoViewController: UITableViewController { IQKeyboardManager.shared.enable = true IQKeyboardManager.shared.enableAutoToolbar = true - IQKeyboardManager.shared.keyboardDistanceFromTextField = 60 + IQKeyboardManager.shared.keyboardDistanceFromTextField = 100 } override var preferredStatusBarStyle: UIStatusBarStyle{get { return .lightContent}} @@ -189,6 +189,8 @@ extension FWDemoViewController { vProperty.buttonFontSize = 14.0 vProperty.maskViewColor = UIColor(white: 0, alpha: 0.5) vProperty.touchWildToHide = "1" + vProperty.dark_backgroundColor = kPV_RGBA(r: 90, g: 90, b: 90, a: 1) + vProperty.dark_splitColor = kPV_RGBA(r: 100, g: 100, b: 100, a: 1) // 还有很多参数可设置... let alertView = FWAlertView.alert(title: "标题", detail: "描述描述描述描述描述描述描述描述描述描述", inputPlaceholder: nil, keyboardType: .default, isSecureTextEntry: false, customView: nil, items: items, vProperty: vProperty) @@ -233,6 +235,7 @@ extension FWDemoViewController { let vProperty = FWSheetViewProperty() vProperty.touchWildToHide = "1" vProperty.cancelItemTitleColor = UIColor.red + vProperty.dark_cancelItemTitleColor = kPV_RGBA(r: 125, g: 144, b: 169, a: 1) let sheetView = FWSheetView.sheet(title: "", itemTitles: items, itemBlock: { (popupView, index, title) in print("Sheet:点击了第\(index)个按钮") diff --git a/FWPopupViewSwiftDemo/FWPopupView/FWMenuViewDemoVC.swift b/FWPopupViewSwiftDemo/FWPopupView/FWMenuViewDemoVC.swift index 5c6100f..14a8ade 100644 --- a/FWPopupViewSwiftDemo/FWPopupView/FWMenuViewDemoVC.swift +++ b/FWPopupViewSwiftDemo/FWPopupView/FWMenuViewDemoVC.swift @@ -85,7 +85,7 @@ class FWMenuViewDemoVC: UIViewController { override func viewDidLoad() { super.viewDidLoad() - self.view.backgroundColor = UIColor.white + self.view.backgroundColor = UIColor.fw_colorWithStyleColors(lightColor: UIColor.white, darkColor: UIColor.black) let buttonItem: UIBarButtonItem = UIBarButtonItem(image: UIImage(named: "mqz_nav_add"), style: .plain, target: self, action: #selector(barBtnAction(_:))) buttonItem.imageInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: -6) diff --git a/FWPopupViewSwiftDemo/Pods/Pods.xcodeproj/xcuserdata/xfg.xcuserdatad/xcschemes/xcschememanagement.plist b/FWPopupViewSwiftDemo/Pods/Pods.xcodeproj/xcuserdata/xfg.xcuserdatad/xcschemes/xcschememanagement.plist index 1f10fbb..575a591 100644 --- a/FWPopupViewSwiftDemo/Pods/Pods.xcodeproj/xcuserdata/xfg.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/FWPopupViewSwiftDemo/Pods/Pods.xcodeproj/xcuserdata/xfg.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,17 +7,17 @@ IQKeyboardManagerSwift.xcscheme_^#shared#^_ orderHint - 1 + 0 Pods-FWPopupView.xcscheme_^#shared#^_ orderHint - 0 + 3 SnapKit.xcscheme_^#shared#^_ orderHint - 3 + 2