// // MCDatePikerStyle.swift // HCQuanfangtong // // Created by Apple on 2022/5/7. // Copyright © 2022 Jyp. All rights reserved. // import Foundation extension MCDatePikerView : MCDatePikerStyleDelegate{ func delegateForPikerBackgroundColor() -> UIColor{ UIColor.white } func delegateForPikerHeight() -> CGFloat { 222 } func delegateForPikerRowHeight() -> CGFloat { 44 } func delegateForPikerTitleColor() -> UIColor { kThemeOfTextBlackColor } func delegateForPikerTitleFont() -> UIFont { UIFont.pingFangSC(withWeight: .semibold, size: 16) } func delegateForPikerTitleDisableColor() -> UIColor{ kThemeOfTextDisabledColor } func delegateForPikerTitleDisableFont() -> UIFont{ UIFont.pingFangSC(withWeight: .semibold, size: 16) } func delegateForPikerContentWidth() -> CGFloat{ kSCREEN_WIDTH - 40 } func delegateForToolBarHeight() -> CGFloat { 38 } func delegateForCancelTitle() -> String { "取消" } func delegateForCancelTitleColor() -> UIColor { kThemeOfTextBlackColor } func delegateForCancelTitleFont() -> UIFont { UIFont.systemFont(ofSize: 16) } func delegateForOKTitle() -> String { "完成" } func delegateForOKTitleColor() -> UIColor { kThemeColor } func delegateForOKTitleFont() -> UIFont { UIFont.pingFangSC(withWeight: .regular, size: 16) } func delegateForOKBackgroundColor() -> UIColor { kThemeOfBackgroundColor } func delegateForCancelBackgroundColor() -> UIColor { kThemeOfBackgroundColor } func delegateForToolBarBackgroundColor() -> UIColor { kThemeOfBackgroundColor } func delegateForToolBarItemWidth() -> CGFloat { 64 } func delegateForToolBarItemMarginLeftSpace() -> CGFloat { 0 } func delegateForToolBarItemMarginTopSpace() -> CGFloat { 0 } func delegateForPikerViewBottomSpace() -> CGFloat{ if #available(iOS 11.0, *) { guard let dis = UIApplication.shared.delegate?.window??.safeAreaInsets.bottom, dis > 0 else{ return 0 } return 20 } return 0 } }