123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- //
- // 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
- }
-
- }
|