QMUIConfigurationTemplate.m 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364
  1. //
  2. // QMUIConfigurationTemplate.m
  3. // qmui
  4. //
  5. // Created by QMUI Team on 15/3/29.
  6. // Copyright (c) 2015年 QMUI Team. All rights reserved.
  7. //
  8. #import "QMUIConfigurationTemplate.h"
  9. @implementation QMUIConfigurationTemplate
  10. #pragma mark - <QMUIConfigurationTemplateProtocol>
  11. - (void)applyConfigurationTemplate {
  12. // === 修改配置值 === //
  13. #pragma mark - Global Color
  14. QMUICMI.clearColor = [UIColor colorWithRed:1 green:1 blue:1 alpha:0]; // UIColorClear : 透明色
  15. QMUICMI.whiteColor = [UIColor colorWithRed:1 green:1 blue:1 alpha:1]; // UIColorWhite : 白色(不用 [UIColor whiteColor] 是希望保持颜色空间为 RGB)
  16. QMUICMI.blackColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:1]; // UIColorBlack : 黑色(不用 [UIColor blackColor] 是希望保持颜色空间为 RGB)
  17. QMUICMI.grayColor = UIColorGray4; // UIColorGray : 最常用的灰色
  18. QMUICMI.grayDarkenColor = UIColor.qd_mainTextColor; // UIColorGrayDarken : 深一点的灰色
  19. QMUICMI.grayLightenColor = UIColorGray7; // UIColorGrayLighten : 浅一点的灰色
  20. QMUICMI.redColor = UIColorMake(250, 58, 58); // UIColorRed : 红色
  21. QMUICMI.greenColor = UIColorTheme4; // UIColorGreen : 绿色
  22. QMUICMI.blueColor = UIColorTheme6; // UIColorBlue : 蓝色
  23. QMUICMI.yellowColor = UIColorTheme3; // UIColorYellow : 黄色
  24. QMUICMI.linkColor = UIColorMake(56, 116, 171); // UIColorLink : 文字链接颜色
  25. QMUICMI.disabledColor = UIColorGray; // UIColorDisabled : 全局 disabled 的颜色,一般用于 UIControl 等控件
  26. QMUICMI.backgroundColor = UIColor.qd_backgroundColor; // UIColorForBackground : 界面背景色,默认用于 QMUICommonViewController.view 的背景色
  27. QMUICMI.maskDarkColor = UIColorMakeWithRGBA(0, 0, 0, .35f); // UIColorMask : 深色的背景遮罩,默认用于 QMAlertController、QMUIDialogViewController 等弹出控件的遮罩
  28. QMUICMI.maskLightColor = UIColorMakeWithRGBA(255, 255, 255, .5f); // UIColorMaskWhite : 浅色的背景遮罩,QMUIKit 里默认没用到,只是占个位
  29. QMUICMI.separatorColor = UIColor.qd_separatorColor; // UIColorSeparator : 全局默认的分割线颜色,默认用于列表分隔线颜色、UIView (QMUIBorder) 分隔线颜色
  30. QMUICMI.separatorDashedColor = UIColorMake(17, 17, 17); // UIColorSeparatorDashed : 全局默认的虚线分隔线的颜色,默认 QMUIKit 暂时没用到
  31. QMUICMI.placeholderColor = UIColor.qd_placeholderColor; // UIColorPlaceholder,全局的输入框的 placeholder 颜色,默认用于 QMUITextField、QMUITextView,不影响系统 UIKit 的输入框
  32. // 测试用的颜色
  33. QMUICMI.testColorRed = UIColorMakeWithRGBA(255, 0, 0, .3);
  34. QMUICMI.testColorGreen = UIColorMakeWithRGBA(0, 255, 0, .3);
  35. QMUICMI.testColorBlue = UIColorMakeWithRGBA(0, 0, 255, .3);
  36. #pragma mark - QMUILog
  37. QMUICMI.shouldPrintDefaultLog = YES; // ShouldPrintDefaultLog : 是否允许输出 QMUILogLevelDefault 级别的 log
  38. QMUICMI.shouldPrintInfoLog = YES; // ShouldPrintInfoLog : 是否允许输出 QMUILogLevelInfo 级别的 log
  39. QMUICMI.shouldPrintWarnLog = YES; // ShouldPrintInfoLog : 是否允许输出 QMUILogLevelWarn 级别的 log
  40. QMUICMI.shouldPrintQMUIWarnLogToConsole = YES; // ShouldPrintQMUIWarnLogToConsole : 是否在出现 QMUILogWarn 时自动把这些 log 以 QMUIConsole 的方式显示到设备屏幕上
  41. #pragma mark - UIControl
  42. QMUICMI.controlHighlightedAlpha = 0.5f; // UIControlHighlightedAlpha : UIControl 系列控件在 highlighted 时的 alpha,默认用于 QMUIButton、 QMUINavigationTitleView
  43. QMUICMI.controlDisabledAlpha = 0.5f; // UIControlDisabledAlpha : UIControl 系列控件在 disabled 时的 alpha,默认用于 QMUIButton
  44. #pragma mark - UIButton
  45. QMUICMI.buttonHighlightedAlpha = UIControlHighlightedAlpha; // ButtonHighlightedAlpha : QMUIButton 在 highlighted 时的 alpha,不影响系统的 UIButton
  46. QMUICMI.buttonDisabledAlpha = UIControlDisabledAlpha; // ButtonDisabledAlpha : QMUIButton 在 disabled 时的 alpha,不影响系统的 UIButton
  47. QMUICMI.buttonTintColor = UIColor.qd_tintColor; // ButtonTintColor : QMUIButton 默认的 tintColor,不影响系统的 UIButton
  48. #pragma mark - TextInput
  49. QMUICMI.textFieldTextColor = UIColor.qd_titleTextColor; // TextFieldTextColor : QMUITextField、QMUITextView 的 textColor,不影响 UIKit 的输入框
  50. QMUICMI.textFieldTintColor = UIColor.qd_tintColor; // TextFieldTintColor : QMUITextField、QMUITextView 的 tintColor,不影响 UIKit 的输入框
  51. QMUICMI.textFieldTextInsets = UIEdgeInsetsMake(0, 7, 0, 7); // TextFieldTextInsets : QMUITextField 的内边距,不影响 UITextField
  52. QMUICMI.keyboardAppearance = UIKeyboardAppearanceDefault; // KeyboardAppearance : UITextView、UITextField、UISearchBar 的 keyboardAppearance
  53. #pragma mark - UISwitch
  54. QMUICMI.switchOnTintColor = RQ_MAIN_COLOR; // SwitchOnTintColor : UISwitch 打开时的背景色(除了圆点外的其他颜色)
  55. QMUICMI.switchOffTintColor = UIColor.qd_separatorColor; // SwitchOffTintColor : UISwitch 关闭时的背景色(除了圆点外的其他颜色)
  56. QMUICMI.switchThumbTintColor = nil; // SwitchThumbTintColor : UISwitch 中间的操控圆点的颜色
  57. #pragma mark - NavigationBar
  58. if (@available(iOS 15.0, *)) {
  59. QMUICMI.navBarUsesStandardAppearanceOnly = YES; // NavBarUsesStandardAppearanceOnly : 对于 iOS 15 的系统,UINavigationBar 的样式分为滚动前和滚动后,虽然系统的注释里说了如果没设置 scrollEdgeAppearance 则会用 standardAppearance 代替,但实际运行效果是 scrollEdgeAppearance 默认并不会保持与 standardAppearance 一致,所以这里提供一个开关,允许你在打开开关时让 QMUI 帮你同步 standardAppearance 的值,以使 App 保持与 iOS 14 相同的效果。如需打开该开关,请保证在其他 NavBar 开关之前设置。
  60. }
  61. QMUICMI.navBarContainerClasses = @[QMUINavigationController.class]; // NavBarContainerClasses : NavigationBar 系列开关被用于 UIAppearance 时的生效范围(默认情况下除了用于 UIAppearance 外,还用于实现了 QMUINavigationControllerAppearanceDelegate 的 UIViewController),默认为 nil。当赋值为 nil 或者空数组时等效于 @[UINavigationController.class],也即对所有 UINavigationBar 生效,包括系统的通讯录(ContactsUI.framework)、打印等。当值不为空时,获取 UINavigationBar 的 appearance 请使用 UINavigationBar.qmui_appearanceConfigured 方法代替系统的 UINavigationBar.appearance。请保证这个配置项先于其他任意 NavBar 配置项执行。
  62. QMUICMI.navBarHighlightedAlpha = 0.2f; // NavBarHighlightedAlpha : QMUINavigationButton 在 highlighted 时的 alpha
  63. QMUICMI.navBarDisabledAlpha = 0.2f; // NavBarDisabledAlpha : QMUINavigationButton 在 disabled 时的 alpha
  64. QMUICMI.navBarButtonFont = UIFontMake(17); // NavBarButtonFont : UINavigationBar 里 UIBarButtonItem 以及 QMUINavigationButtonTypeNormal 的字体
  65. QMUICMI.navBarButtonFontBold = UIFontBoldMake(17); // NavBarButtonFontBold : iOS 15 及以后用于设置 UINavigationBar 里 Done 类型的 UIBarButtonItem 以及 QMUINavigationButtonTypeBold 的字体,iOS 14 及以前只对后者生效
  66. QMUICMI.navBarBackgroundImage = UIImage.qd_navigationBarBackgroundImage; // NavBarBackgroundImage : UINavigationBar 的背景图,注意 navigationBar 的高度会受多个因素(是否全面屏、是否使用了 navigationItem.prompt、是否将 UISearchBar 作为 titleView)的影响,要检查各种情况是否都显示正常。
  67. if (@available(iOS 15.0, *)) {
  68. QMUICMI.navBarRemoveBackgroundEffectAutomatically = YES; // NavBarRemoveBackgroundEffectAutomatically : iOS 15 及以后,QMUI 里的 UINavigationBar 使用的是 UINavigationBarAppearance 来设置样式,新方式默认是 backgroundImage 和 backgroundEffect 共存的,而 iOS 14 及以前的旧方式,一旦设置了 backgroundImage 则 backgroundEffect 自动会被移除,因此提供该开关允许业务将行为回退到 iOS 14 及以前的效果。默认为 NO。
  69. }
  70. QMUICMI.navBarShadowImage = nil; // NavBarShadowImage : UINavigationBar.shadowImage,也即导航栏底部那条分隔线,配合 NavBarShadowImageColor 使用。
  71. QMUICMI.navBarShadowImageColor = UIColorClear; // NavBarShadowImageColor : UINavigationBar.shadowImage 的颜色,如果为 nil,则使用 NavBarShadowImage 的值,如果 NavBarShadowImage 也为 nil,则使用系统默认的分隔线。如果不为 nil,而 NavBarShadowImage 为 nil,则自动创建一张 1px 高的图并将其设置为 NavBarShadowImageColor 的颜色然后设置上去,如果 NavBarShadowImage 不为 nil 且 renderingMode 不为 UIImageRenderingModeAlwaysOriginal,则将 NavBarShadowImage 设置为 NavBarShadowImageColor 的颜色然后设置上去。
  72. QMUICMI.navBarBarTintColor = nil; // NavBarBarTintColor : UINavigationBar.barTintColor,也即背景色
  73. QMUICMI.navBarStyle = UIBarStyleDefault; // NavBarStyle : UINavigationBar 的 barStyle
  74. QMUICMI.navBarTintColor = RQ_MAIN_TEXT_COLOR_1; // NavBarTintColor : NavBarContainerClasses 里的 UINavigationBar 的 tintColor,也即导航栏上面的按钮颜色
  75. QMUICMI.navBarTitleColor = NavBarTintColor; // NavBarTitleColor : UINavigationBar 的标题颜色,以及 QMUINavigationTitleView 的默认文字颜色
  76. QMUICMI.navBarTitleFont = UIFontBoldMake(17); // NavBarTitleFont : UINavigationBar 的标题字体,以及 QMUINavigationTitleView 的默认字体
  77. QMUICMI.navBarLargeTitleColor = nil; // NavBarLargeTitleColor : UINavigationBar 在大标题模式下的标题颜色
  78. QMUICMI.navBarLargeTitleFont = nil; // NavBarLargeTitleFont : UINavigationBar 在大标题模式下的标题字体
  79. QMUICMI.navBarBackButtonTitlePositionAdjustment = UIOffsetZero; // NavBarBarBackButtonTitlePositionAdjustment : 导航栏返回按钮的文字偏移
  80. QMUICMI.sizeNavBarBackIndicatorImageAutomatically = NO; // SizeNavBarBackIndicatorImageAutomatically : 是否要自动调整 NavBarBackIndicatorImage 的 size 为 (13, 21)
  81. QMUICMI.navBarBackIndicatorImage = UIImage.qd_navigationBarBackIndicatorImage; // NavBarBackIndicatorImage : 导航栏的返回按钮的图片,图片尺寸建议为(13, 21),否则最终的图片位置无法与系统原生的位置保持一致
  82. QMUICMI.navBarCloseButtonImage = UIImage.qd_navigationBarCloseImage; // NavBarCloseButtonImage : QMUINavigationButton 用到的 × 的按钮图片
  83. QMUICMI.navBarLoadingMarginRight = 3; // NavBarLoadingMarginRight : QMUINavigationTitleView 里左边 loading 的右边距
  84. QMUICMI.navBarAccessoryViewMarginLeft = 5; // NavBarAccessoryViewMarginLeft : QMUINavigationTitleView 里右边 accessoryView 的左边距
  85. QMUICMI.navBarActivityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;// NavBarActivityIndicatorViewStyle : QMUINavigationTitleView 里左边 loading 的主题
  86. QMUICMI.navBarAccessoryViewTypeDisclosureIndicatorImage = UIImage.qd_navigationBarDisclosureIndicatorImage; // NavBarAccessoryViewTypeDisclosureIndicatorImage : QMUINavigationTitleView 右边箭头的图片
  87. #pragma mark - TabBar
  88. if (@available(iOS 15.0, *)) {
  89. QMUICMI.tabBarUsesStandardAppearanceOnly = YES; // TabBarUsesStandardAppearanceOnly : 对于 iOS 15 的系统,UITabBar 的样式分为滚动前和滚动后,虽然系统的注释里说了如果没设置 scrollEdgeAppearance 则会用 standardAppearance 代替,但实际运行效果是 scrollEdgeAppearance 默认并不会保持与 standardAppearance 一致,所以这里提供一个开关,允许你在打开开关时让 QMUI 帮你同步 standardAppearance 的值,以使 App 保持与 iOS 14 相同的效果。如需打开该开关,请保证在其他 NavBar 开关之前设置。
  90. }
  91. QMUICMI.tabBarContainerClasses = nil; // TabBarContainerClasses : TabBar 系列开关的生效范围,默认为 nil,当赋值为 nil 或者空数组时等效于 @[UITabBarController.class],也即对所有 UITabBar 生效。当值不为空时,获取 UITabBar 的 appearance 请使用 UITabBar.qmui_appearanceConfigured 方法代替系统的 UITabBar.appearance。请保证这个配置项先于其他任意 TabBar 配置项执行。
  92. QMUICMI.tabBarBackgroundImage = nil; // TabBarBackgroundImage : UITabBar 的背景图,建议使用 resizableImage,否则在 UITabBar (NavigationController) 的 setBackgroundImage: 里会每次都视为 image 发生了变化(isEqual: 为 NO)
  93. if (@available(iOS 15.0, *)) {
  94. QMUICMI.tabBarRemoveBackgroundEffectAutomatically = YES; // TabBarRemoveBackgroundEffectAutomatically : iOS 15 及以后,QMUI 里的 UITabBar 使用的是 UITabBarAppearance 来设置样式,新方式默认是 backgroundImage 和 backgroundEffect 共存的,而 iOS 14 及以前的旧方式,一旦设置了 backgroundImage 则 backgroundEffect 自动会被移除,因此提供该开关允许业务将行为回退到 iOS 14 及以前的效果。默认为 NO。
  95. }
  96. QMUICMI.tabBarBarTintColor = nil; // TabBarBarTintColor : UITabBar 的 barTintColor,如果需要看到磨砂效果则应该提供半透明的色值
  97. QMUICMI.tabBarShadowImageColor = UIColorSeparator; // TabBarShadowImageColor : UITabBar 的 shadowImage 的颜色,会自动创建一张 1px 高的图片
  98. QMUICMI.tabBarStyle = UIBarStyleDefault; // TabBarStyle : UITabBar 的 barStyle
  99. QMUICMI.tabBarItemTitleFont = UIFontMake(10); // TabBarItemTitleFont : UITabBarItem 的标题字体
  100. QMUICMI.tabBarItemTitleFontSelected = nil; // TabBarItemTitleFontSelected : 选中的 UITabBarItem 的标题字体
  101. QMUICMI.tabBarItemTitleColor = UIColor.qd_descriptionTextColor; // TabBarItemTitleColor : 未选中的 UITabBarItem 的标题颜色
  102. QMUICMI.tabBarItemTitleColorSelected = UIColor.qd_tintColor; // TabBarItemTitleColorSelected : 选中的 UITabBarItem 的标题颜色
  103. QMUICMI.tabBarItemImageColor = TabBarItemTitleColor; // TabBarItemImageColor : UITabBarItem 未选中时的图片颜色(该配置项在 iOS 12 及以下的系统对 QMUIThemeImage 无效,请自行在 provider 内处理颜色。注意非选中状态的图片需要指定为 UIImageRenderingModeAlwaysOriginal,系统限制如此)
  104. QMUICMI.tabBarItemImageColorSelected = TabBarItemTitleColorSelected; // TabBarItemImageColorSelected : UITabBarItem 选中时的图片颜色
  105. #pragma mark - Toolbar
  106. if (@available(iOS 15.0, *)) {
  107. QMUICMI.toolBarUsesStandardAppearanceOnly = YES; // ToolBarUsesStandardAppearanceOnly : 对于 iOS 15 的系统,UIToolbar 的样式分为滚动前和滚动后,虽然系统的注释里说了如果没设置 scrollEdgeAppearance 则会用 standardAppearance 代替,但实际运行效果是 scrollEdgeAppearance 默认并不会保持与 standardAppearance 一致,所以这里提供一个开关,允许你在打开开关时让 QMUI 帮你同步 standardAppearance 的值,以使 App 保持与 iOS 14 相同的效果。如需打开该开关,请保证在其他 NavBar 开关之前设置。
  108. }
  109. QMUICMI.toolBarContainerClasses = @[QMUINavigationController.class]; // ToolBarContainerClasses : ToolBar 系列开关的生效范围,默认为 nil,当赋值为 nil 或者空数组时等效于 @[UINavigationController.class],也即对所有 UIToolbar 生效。当值不为空时,获取 UIToolbar 的 appearance 请使用 UIToolbar.qmui_appearanceConfigured 方法代替系统的 UIToolbar.appearance。请保证这个配置项先于其他任意 ToolBar 配置项执行。
  110. QMUICMI.toolBarHighlightedAlpha = 0.4f; // ToolBarHighlightedAlpha : QMUIToolbarButton 在 highlighted 状态下的 alpha
  111. QMUICMI.toolBarDisabledAlpha = 0.4f; // ToolBarDisabledAlpha : QMUIToolbarButton 在 disabled 状态下的 alpha
  112. QMUICMI.toolBarTintColor = UIColor.qd_tintColor; // ToolBarTintColor : NavBarContainerClasses 里的 UIToolbar 的 tintColor,以及 QMUIToolbarButton normal 状态下的文字颜色
  113. QMUICMI.toolBarTintColorHighlighted = [ToolBarTintColor colorWithAlphaComponent:ToolBarHighlightedAlpha]; // ToolBarTintColorHighlighted : QMUIToolbarButton 在 highlighted 状态下的文字颜色
  114. QMUICMI.toolBarTintColorDisabled = [ToolBarTintColor colorWithAlphaComponent:ToolBarDisabledAlpha]; // ToolBarTintColorDisabled : QMUIToolbarButton 在 disabled 状态下的文字颜色
  115. QMUICMI.toolBarBackgroundImage = nil; // ToolBarBackgroundImage : NavBarContainerClasses 里的 UIToolbar 的背景图
  116. if (@available(iOS 15.0, *)) {
  117. QMUICMI.toolBarRemoveBackgroundEffectAutomatically = YES; // ToolBarRemoveBackgroundEffectAutomatically : iOS 15 及以后,QMUI 里的 UIToolbar 使用的是 UIToolbarAppearance 来设置样式,新方式默认是 backgroundImage 和 backgroundEffect 共存的,而 iOS 14 及以前的旧方式,一旦设置了 backgroundImage 则 backgroundEffect 自动会被移除,因此提供该开关允许业务将行为回退到 iOS 14 及以前的效果。默认为 NO。
  118. }
  119. QMUICMI.toolBarBarTintColor = nil; // ToolBarBarTintColor : NavBarContainerClasses 里的 UIToolbar 的 tintColor
  120. QMUICMI.toolBarShadowImageColor = UIColorSeparator; // ToolBarShadowImageColor : NavBarContainerClasses 里的 UIToolbar 的 shadowImage 的颜色,会自动创建一张 1px 高的图片
  121. QMUICMI.toolBarStyle = UIBarStyleDefault; // ToolBarStyle : NavBarContainerClasses 里的 UIToolbar 的 barStyle
  122. QMUICMI.toolBarButtonFont = UIFontMake(17); // ToolBarButtonFont : QMUIToolbarButton 的字体
  123. #pragma mark - SearchBar
  124. QMUICMI.searchBarTextFieldBackgroundImage = UIImage.qd_searchBarTextFieldBackgroundImage; // SearchBarTextFieldBackgroundImage : QMUISearchBar 里的文本框的背景图,图片高度会决定输入框的高度
  125. QMUICMI.searchBarTextFieldBorderColor = nil; // SearchBarTextFieldBorderColor : QMUISearchBar 里的文本框的边框颜色
  126. QMUICMI.searchBarTextFieldCornerRadius = 4.0; // SearchBarTextFieldCornerRadius : QMUISearchBar 里的文本框的圆角大小,-1 表示圆角大小为输入框高度的一半
  127. QMUICMI.searchBarBackgroundImage = UIImage.qd_searchBarBackgroundImage; // SearchBarBackgroundImage : 搜索框的背景图,如果需要设置底部分隔线的颜色也请绘制到图片里
  128. QMUICMI.searchBarTintColor = UIColor.qd_tintColor; // SearchBarTintColor : QMUISearchBar 的 tintColor,也即上面的操作控件的主题色
  129. QMUICMI.searchBarTextColor = UIColor.qd_titleTextColor; // SearchBarTextColor : QMUISearchBar 里的文本框的文字颜色
  130. QMUICMI.searchBarPlaceholderColor = [UIColor qmui_colorWithThemeProvider:^UIColor * _Nonnull(__kindof QMUIThemeManager * _Nonnull manager, NSString * _Nullable identifier, NSObject<QDThemeProtocol> *theme) {
  131. if ([identifier isEqualToString:QDThemeIdentifierDark]) {
  132. return theme.themePlaceholderColor;
  133. }
  134. return UIColorMake(136, 136, 143);
  135. }]; // SearchBarPlaceholderColor : QMUISearchBar 里的文本框的 placeholder 颜色
  136. QMUICMI.searchBarFont = UIFontMake(15); // SearchBarFont : QMUISearchBar 里的文本框的文字字体及 placeholder 的字体
  137. QMUICMI.searchBarSearchIconImage = nil; // SearchBarSearchIconImage : QMUISearchBar 里的放大镜 icon
  138. QMUICMI.searchBarClearIconImage = nil; // SearchBarClearIconImage : QMUISearchBar 里的文本框输入文字时右边的清空按钮的图片
  139. #pragma mark - Plain TableView
  140. QMUICMI.tableViewEstimatedHeightEnabled = YES; // TableViewEstimatedHeightEnabled : 是否要开启全局 QMUITableView 和 UITableView 的 estimatedRow(Section/Footer)Height
  141. QMUICMI.tableViewBackgroundColor = UIColorForBackground; // TableViewBackgroundColor : Plain 类型的 QMUITableView 的背景色颜色
  142. QMUICMI.tableSectionIndexColor = UIColorGrayDarken; // TableSectionIndexColor : 列表右边的字母索引条的文字颜色
  143. QMUICMI.tableSectionIndexBackgroundColor = UIColorClear; // TableSectionIndexBackgroundColor : 列表右边的字母索引条的背景色
  144. QMUICMI.tableSectionIndexTrackingBackgroundColor = UIColorClear; // TableSectionIndexTrackingBackgroundColor : 列表右边的字母索引条在选中时的背景色
  145. QMUICMI.tableViewSeparatorColor = UIColorSeparator; // TableViewSeparatorColor : 列表的分隔线颜色
  146. QMUICMI.tableViewCellNormalHeight = 56; // TableViewCellNormalHeight : QMUITableView 的默认 cell 高度
  147. QMUICMI.tableViewCellTitleLabelColor = UIColor.qd_mainTextColor; // TableViewCellTitleLabelColor : QMUITableViewCell 的 textLabel 的文字颜色
  148. QMUICMI.tableViewCellDetailLabelColor = UIColor.qd_descriptionTextColor; // TableViewCellDetailLabelColor : QMUITableViewCell 的 detailTextLabel 的文字颜色
  149. QMUICMI.tableViewCellBackgroundColor = UIColorForBackground; // TableViewCellBackgroundColor : QMUITableViewCell 的背景色
  150. QMUICMI.tableViewCellSelectedBackgroundColor = UIColor.qd_backgroundColorHighlighted; // TableViewCellSelectedBackgroundColor : QMUITableViewCell 点击时的背景色
  151. QMUICMI.tableViewCellWarningBackgroundColor = UIColorYellow; // TableViewCellWarningBackgroundColor : QMUITableViewCell 用于表示警告时的背景色,备用
  152. QMUICMI.tableViewCellDisclosureIndicatorImage = UIImage.qd_tableViewCellDisclosureIndicatorImage; // TableViewCellDisclosureIndicatorImage : QMUITableViewCell 当 accessoryType 为 UITableViewCellAccessoryDisclosureIndicator 时的箭头的图片
  153. QMUICMI.tableViewCellCheckmarkImage = UIImage.qd_tableViewCellCheckmarkImage; // TableViewCellCheckmarkImage : QMUITableViewCell 当 accessoryType 为 UITableViewCellAccessoryCheckmark 时的打钩的图片
  154. QMUICMI.tableViewCellDetailButtonImage = UIImage.qd_tableViewCellDetailButtonImage; // TableViewCellDetailButtonImage : QMUITableViewCell 当 accessoryType 为 UITableViewCellAccessoryDetailButton 或 UITableViewCellAccessoryDetailDisclosureButton 时右边的 i 按钮图片
  155. QMUICMI.tableViewCellSpacingBetweenDetailButtonAndDisclosureIndicator = 12; // TableViewCellSpacingBetweenDetailButtonAndDisclosureIndicator : 列表 cell 右边的 i 按钮和向右箭头之间的间距(仅当两者都使用了自定义图片并且同时显示时才生效)
  156. QMUICMI.tableViewSectionHeaderBackgroundColor = UIColor.qd_separatorColor; // TableViewSectionHeaderBackgroundColor : Plain 类型的 QMUITableView sectionHeader 的背景色
  157. QMUICMI.tableViewSectionFooterBackgroundColor = UIColor.qd_separatorColor; // TableViewSectionFooterBackgroundColor : Plain 类型的 QMUITableView sectionFooter 的背景色
  158. QMUICMI.tableViewSectionHeaderFont = UIFontBoldMake(12); // TableViewSectionHeaderFont : Plain 类型的 QMUITableView sectionHeader 里的文字字体
  159. QMUICMI.tableViewSectionFooterFont = UIFontBoldMake(12); // TableViewSectionFooterFont : Plain 类型的 QMUITableView sectionFooter 里的文字字体
  160. QMUICMI.tableViewSectionHeaderTextColor = UIColorGray5; // TableViewSectionHeaderTextColor : Plain 类型的 QMUITableView sectionHeader 里的文字颜色
  161. QMUICMI.tableViewSectionFooterTextColor = UIColorGray; // TableViewSectionFooterTextColor : Plain 类型的 QMUITableView sectionFooter 里的文字颜色
  162. QMUICMI.tableViewSectionHeaderAccessoryMargins = UIEdgeInsetsMake(0, 15, 0, 0); // TableViewSectionHeaderAccessoryMargins : Plain 类型的 QMUITableView sectionHeader accessoryView 的间距
  163. QMUICMI.tableViewSectionFooterAccessoryMargins = UIEdgeInsetsMake(0, 15, 0, 0); // TableViewSectionFooterAccessoryMargins : Plain 类型的 QMUITableView sectionFooter accessoryView 的间距
  164. QMUICMI.tableViewSectionHeaderContentInset = UIEdgeInsetsMake(4, 15, 4, 15); // TableViewSectionHeaderContentInset : Plain 类型的 QMUITableView sectionHeader 里的内容的 padding
  165. QMUICMI.tableViewSectionFooterContentInset = UIEdgeInsetsMake(4, 15, 4, 15); // TableViewSectionFooterContentInset : Plain 类型的 QMUITableView sectionFooter 里的内容的 padding
  166. if (@available(iOS 15, *)) {
  167. QMUICMI.tableViewSectionHeaderTopPadding = 0; // TableViewSectionHeaderTopPadding : Plain 类型的 QMUITableView 在 iOS 15 上的 sectionHeaderTopPadding 值,仅当存在 sectionHeader 时才有效,系统的默认值为 UITableViewAutomaticDimension,表现出来是22pt的空隙
  168. }
  169. #pragma mark - Grouped TableView
  170. QMUICMI.tableViewGroupedBackgroundColor = [UIColor qmui_colorWithThemeProvider:^UIColor * _Nonnull(__kindof QMUIThemeManager * _Nonnull manager, NSString * _Nullable identifier, NSObject<QDThemeProtocol> * _Nullable theme) {
  171. if ([identifier isEqualToString:QDThemeIdentifierDark]) {
  172. return QMUICMI.tableViewBackgroundColor;
  173. }
  174. return UIColorMake(246, 246, 246);
  175. }]; // TableViewGroupedBackgroundColor : Grouped 类型的 QMUITableView 的背景色
  176. QMUICMI.tableViewGroupedSeparatorColor = TableViewSeparatorColor; // TableViewGroupedSeparatorColor : Grouped 类型的 QMUITableView 分隔线颜色
  177. QMUICMI.tableViewGroupedCellTitleLabelColor = TableViewCellTitleLabelColor; // TableViewGroupedCellTitleLabelColor : Grouped 类型的 QMUITableView cell 里的标题颜色
  178. QMUICMI.tableViewGroupedCellDetailLabelColor = TableViewCellDetailLabelColor; // TableViewGroupedCellDetailLabelColor : Grouped 类型的 QMUITableView cell 里的副标题颜色
  179. QMUICMI.tableViewGroupedCellBackgroundColor = UIColor.qd_backgroundColorLighten; // TableViewGroupedCellBackgroundColor : Grouped 类型的 QMUITableView cell 背景色
  180. QMUICMI.tableViewGroupedCellSelectedBackgroundColor = TableViewCellSelectedBackgroundColor; // TableViewGroupedCellSelectedBackgroundColor : Grouped 类型的 QMUITableView cell 点击时的背景色
  181. QMUICMI.tableViewGroupedCellWarningBackgroundColor = TableViewCellWarningBackgroundColor; // tableViewGroupedCellWarningBackgroundColor : Grouped 类型的 QMUITableView cell 在提醒状态下的背景色
  182. QMUICMI.tableViewGroupedSectionHeaderFont = UIFontMake(12); // TableViewGroupedSectionHeaderFont : Grouped 类型的 QMUITableView sectionHeader 里的文字字体
  183. QMUICMI.tableViewGroupedSectionFooterFont = UIFontMake(12); // TableViewGroupedSectionFooterFont : Grouped 类型的 QMUITableView sectionFooter 里的文字字体
  184. QMUICMI.tableViewGroupedSectionHeaderTextColor = UIColorGrayDarken; // TableViewGroupedSectionHeaderTextColor : Grouped 类型的 QMUITableView sectionHeader 里的文字颜色
  185. QMUICMI.tableViewGroupedSectionFooterTextColor = TableViewGroupedSectionHeaderTextColor; // TableViewGroupedSectionFooterTextColor : Grouped 类型的 QMUITableView sectionFooter 里的文字颜色
  186. QMUICMI.tableViewGroupedSectionHeaderAccessoryMargins = UIEdgeInsetsMake(0, 15, 0, 0); // TableViewGroupedSectionHeaderAccessoryMargins : Grouped 类型的 QMUITableView sectionHeader accessoryView 的间距
  187. QMUICMI.tableViewGroupedSectionFooterAccessoryMargins = UIEdgeInsetsMake(0, 15, 0, 0); // TableViewGroupedSectionFooterAccessoryMargins : Grouped 类型的 QMUITableView sectionFooter accessoryView 的间距
  188. QMUICMI.tableViewGroupedSectionHeaderDefaultHeight = 20; // TableViewGroupedSectionHeaderDefaultHeight : Grouped 类型的 QMUITableView sectionHeader 的默认高度(也即没使用自定义的 sectionHeaderView 时的高度),注意如果不需要间距,请用 CGFLOAT_MIN
  189. QMUICMI.tableViewGroupedSectionFooterDefaultHeight = 0; // TableViewGroupedSectionFooterDefaultHeight : Grouped 类型的 QMUITableView sectionFooter 的默认高度(也即没使用自定义的 sectionFooterView 时的高度),注意如果不需要间距,请用 CGFLOAT_MIN
  190. QMUICMI.tableViewGroupedSectionHeaderContentInset = UIEdgeInsetsMake(16, PreferredValueForVisualDevice(20, 15), 8, PreferredValueForVisualDevice(20, 15)); // TableViewGroupedSectionHeaderContentInset : Grouped 类型的 QMUITableView sectionHeader 里的内容的 padding
  191. QMUICMI.tableViewGroupedSectionFooterContentInset = UIEdgeInsetsMake(8, TableViewGroupedSectionHeaderContentInset.left, 2, TableViewGroupedSectionHeaderContentInset.right); // TableViewGroupedSectionFooterContentInset : Grouped 类型的 QMUITableView sectionFooter 里的内容的 padding
  192. if (@available(iOS 15, *)) {
  193. QMUICMI.tableViewGroupedSectionHeaderTopPadding = 0; // TableViewGroupedSectionHeaderTopPadding : Grouped 类型的 QMUITableView 在 iOS 15 上的 sectionHeaderTopPadding 值,仅当存在 sectionHeader 时才有效,系统的默认值为 UITableViewAutomaticDimension,表现出来是0。
  194. }
  195. #pragma mark - InsetGrouped TableView
  196. QMUICMI.tableViewInsetGroupedCornerRadius = 10; // TableViewInsetGroupedCornerRadius : InsetGrouped 类型的 UITableView 内 cell 的圆角值
  197. QMUICMI.tableViewInsetGroupedHorizontalInset = PreferredValueForVisualDevice(20, 15); // TableViewInsetGroupedHorizontalInset: InsetGrouped 类型的 UITableView 内的左右缩进值
  198. QMUICMI.tableViewInsetGroupedBackgroundColor = TableViewGroupedBackgroundColor; // TableViewInsetGroupedBackgroundColor : InsetGrouped 类型的 UITableView 的背景色
  199. QMUICMI.tableViewInsetGroupedSeparatorColor = TableViewGroupedSeparatorColor; // TableViewInsetGroupedSeparatorColor : InsetGrouped 类型的 QMUITableView 分隔线颜色
  200. QMUICMI.tableViewInsetGroupedCellTitleLabelColor = TableViewGroupedCellTitleLabelColor; // TableViewInsetGroupedCellTitleLabelColor : InsetGrouped 类型的 QMUITableView cell 里的标题颜色
  201. QMUICMI.tableViewInsetGroupedCellDetailLabelColor = TableViewGroupedCellDetailLabelColor; // TableViewInsetGroupedCellDetailLabelColor : InsetGrouped 类型的 QMUITableView cell 里的副标题颜色
  202. QMUICMI.tableViewInsetGroupedCellBackgroundColor = TableViewGroupedCellBackgroundColor; // TableViewInsetGroupedCellBackgroundColor : InsetGrouped 类型的 QMUITableView cell 背景色
  203. QMUICMI.tableViewInsetGroupedCellSelectedBackgroundColor = TableViewGroupedCellSelectedBackgroundColor; // TableViewInsetGroupedCellSelectedBackgroundColor : InsetGrouped 类型的 QMUITableView cell 点击时的背景色
  204. QMUICMI.tableViewInsetGroupedCellWarningBackgroundColor = TableViewGroupedCellWarningBackgroundColor; // TableViewInsetGroupedCellWarningBackgroundColor : InsetGrouped 类型的 QMUITableView cell 在提醒状态下的背景色
  205. QMUICMI.tableViewInsetGroupedSectionHeaderFont = TableViewGroupedSectionHeaderFont; // TableViewInsetGroupedSectionHeaderFont : InsetGrouped 类型的 QMUITableView sectionHeader 里的文字字体
  206. QMUICMI.tableViewInsetGroupedSectionFooterFont = TableViewGroupedSectionFooterFont; // TableViewInsetGroupedSectionFooterFont : InsetGrouped 类型的 QMUITableView sectionFooter 里的文字字体
  207. QMUICMI.tableViewInsetGroupedSectionHeaderTextColor = TableViewGroupedSectionHeaderTextColor; // TableViewInsetGroupedSectionHeaderTextColor : InsetGrouped 类型的 QMUITableView sectionHeader 里的文字颜色
  208. QMUICMI.tableViewInsetGroupedSectionFooterTextColor = TableViewGroupedSectionFooterTextColor; // TableViewInsetGroupedSectionFooterTextColor : InsetGrouped 类型的 QMUITableView sectionFooter 里的文字颜色
  209. QMUICMI.tableViewInsetGroupedSectionHeaderAccessoryMargins = TableViewGroupedSectionHeaderAccessoryMargins; // TableViewInsetGroupedSectionHeaderAccessoryMargins : InsetGrouped 类型的 QMUITableView sectionHeader accessoryView 的间距
  210. QMUICMI.tableViewInsetGroupedSectionFooterAccessoryMargins = TableViewGroupedSectionFooterAccessoryMargins; // TableViewInsetGroupedSectionFooterAccessoryMargins : InsetGrouped 类型的 QMUITableView sectionFooter accessoryView 的间距
  211. QMUICMI.tableViewInsetGroupedSectionHeaderDefaultHeight = TableViewGroupedSectionHeaderDefaultHeight; // TableViewInsetGroupedSectionHeaderDefaultHeight : InsetGrouped 类型的 QMUITableView sectionHeader 的默认高度(也即没使用自定义的 sectionHeaderView 时的高度),注意如果不需要间距,请用 CGFLOAT_MIN
  212. QMUICMI.tableViewInsetGroupedSectionFooterDefaultHeight = TableViewGroupedSectionFooterDefaultHeight; // TableViewInsetGroupedSectionFooterDefaultHeight : InsetGrouped 类型的 QMUITableView sectionFooter 的默认高度(也即没使用自定义的 sectionFooterView 时的高度),注意如果不需要间距,请用 CGFLOAT_MIN
  213. QMUICMI.tableViewInsetGroupedSectionHeaderContentInset = TableViewGroupedSectionHeaderContentInset; // TableViewInsetGroupedSectionHeaderContentInset : InsetGrouped 类型的 QMUITableView sectionHeader 里的内容的 padding
  214. QMUICMI.tableViewInsetGroupedSectionFooterContentInset = TableViewGroupedSectionFooterContentInset; // TableViewInsetGroupedSectionFooterContentInset : InsetGrouped 类型的 QMUITableView sectionFooter 里的内容的 padding
  215. if (@available(iOS 15, *)) {
  216. QMUICMI.tableViewInsetGroupedSectionHeaderTopPadding = 0; // TableViewInsetGroupedSectionHeaderTopPadding : InsetGrouped 类型的 QMUITableView 在 iOS 15 上的 sectionHeaderTopPadding 值,仅当存在 sectionHeader 时才有效,系统的默认值为 UITableViewAutomaticDimension,表现出来是0。
  217. }
  218. #pragma mark - UIWindowLevel
  219. QMUICMI.windowLevelQMUIAlertView = UIWindowLevelAlert - 4.0; // UIWindowLevelQMUIAlertView : QMUIModalPresentationViewController、QMUIPopupContainerView 里使用的 UIWindow 的 windowLevel
  220. QMUICMI.windowLevelQMUIConsole = 1; // UIWindowLevelQMUIConsole : QMUIConsole 内部的 UIWindow 的 windowLevel
  221. #pragma mark - QMUIBadge
  222. QMUICMI.badgeBackgroundColor = UIColorRed; // BadgeBackgroundColor : QMUIBadge 上的未读数的背景色
  223. QMUICMI.badgeTextColor = UIColorWhite; // BadgeTextColor : QMUIBadge 上的未读数的文字颜色
  224. QMUICMI.badgeFont = UIFontBoldMake(11); // BadgeFont : QMUIBadge 上的未读数的字体
  225. QMUICMI.badgeContentEdgeInsets = UIEdgeInsetsMake(2, 4, 2, 4); // BadgeContentEdgeInsets : QMUIBadge 上的未读数与圆圈之间的 padding
  226. QMUICMI.badgeOffset = CGPointMake(-9, 11); // BadgeOffset : QMUIBadge 上的未读数相对于目标 view 右上角的偏移
  227. QMUICMI.badgeOffsetLandscape = CGPointMake(-9, 6); // BadgeOffsetLandscape : QMUIBadge 上的未读数在横屏下相对于目标 view 右上角的偏移
  228. BeginIgnoreDeprecatedWarning
  229. QMUICMI.badgeCenterOffset = CGPointMake(14, -10); // BadgeCenterOffset : QMUIBadge 未读数相对于目标 view 中心的偏移
  230. QMUICMI.badgeCenterOffsetLandscape = CGPointMake(16, -7); // BadgeCenterOffsetLandscape : QMUIBadge 未读数在横屏下相对于目标 view 中心的偏移
  231. EndIgnoreDeprecatedWarning
  232. QMUICMI.updatesIndicatorColor = UIColorRed; // UpdatesIndicatorColor : QMUIBadge 上的未读红点的颜色
  233. QMUICMI.updatesIndicatorSize = CGSizeMake(7, 7); // UpdatesIndicatorSize : QMUIBadge 上的未读红点的大小
  234. QMUICMI.updatesIndicatorOffset = CGPointMake(4, UpdatesIndicatorSize.height);// UpdatesIndicatorOffset : QMUIBadge 未读红点相对于目标 view 右上角的偏移
  235. QMUICMI.updatesIndicatorOffsetLandscape = UpdatesIndicatorOffset; // UpdatesIndicatorOffsetLandscape : QMUIBadge 未读红点在横屏下相对于目标 view 右上角的偏移
  236. BeginIgnoreDeprecatedWarning
  237. QMUICMI.updatesIndicatorCenterOffset = CGPointMake(14, -10); // UpdatesIndicatorCenterOffset : QMUIBadge 未读红点相对于目标 view 中心的偏移
  238. QMUICMI.updatesIndicatorCenterOffsetLandscape = CGPointMake(14, -10); // UpdatesIndicatorCenterOffsetLandscape : QMUIBadge 未读红点在横屏下相对于目标 view 中心点的偏移
  239. EndIgnoreDeprecatedWarning
  240. #pragma mark - Others
  241. QMUICMI.automaticCustomNavigationBarTransitionStyle = YES; // AutomaticCustomNavigationBarTransitionStyle : 界面 push/pop 时是否要自动根据两个界面的 barTintColor/backgroundImage/shadowImage 的样式差异来决定是否使用自定义的导航栏效果
  242. QMUICMI.supportedOrientationMask = UIInterfaceOrientationMaskAll; // SupportedOrientationMask : 默认支持的横竖屏方向
  243. QMUICMI.automaticallyRotateDeviceOrientation = YES; // AutomaticallyRotateDeviceOrientation : 是否在界面切换或 viewController.supportedOrientationMask 发生变化时自动旋转屏幕
  244. QMUICMI.defaultStatusBarStyle = UIStatusBarStyleLightContent; // DefaultStatusBarStyle : 默认的状态栏样式,默认值为 UIStatusBarStyleDefault,也即在 iOS 12 及以前是黑色文字,iOS 13 及以后会自动根据当前 App 是否处于 Dark Mode 切换颜色。如果你希望固定为白色,请设置为 UIStatusBarStyleLightContent,固定黑色则设置为 QMUIStatusBarStyleDarkContent。
  245. QMUICMI.needsBackBarButtonItemTitle = NO; // NeedsBackBarButtonItemTitle : 全局是否需要返回按钮的 title,不需要则只显示一个返回image
  246. QMUICMI.hidesBottomBarWhenPushedInitially = YES; // HidesBottomBarWhenPushedInitially : QMUICommonViewController.hidesBottomBarWhenPushed 的初始值,默认为 NO,以保持与系统默认值一致,但通常建议改为 YES,因为一般只有 tabBar 首页那几个界面要求为 NO
  247. QMUICMI.preventConcurrentNavigationControllerTransitions = YES; // PreventConcurrentNavigationControllerTransitions : 自动保护 QMUINavigationController 在上一次 push/pop 尚未结束的时候就进行下一次 push/pop 的行为,避免产生 crash
  248. QMUICMI.navigationBarHiddenInitially = NO; // NavigationBarHiddenInitially : QMUINavigationControllerDelegate preferredNavigationBarHidden 的初始值,默认为NO
  249. QMUICMI.shouldFixTabBarTransitionBugInIPhoneX = YES; // ShouldFixTabBarTransitionBugInIPhoneX : 是否需要自动修复 iOS 11 下,iPhone X 的设备在 push 界面时,tabBar 会瞬间往上跳的 bug
  250. QMUICMI.shouldFixTabBarSafeAreaInsetsBug = YES; // ShouldFixTabBarSafeAreaInsetsBug : 是否要对 iOS 11 及以后的版本修复当存在 UITabBar 时,UIScrollView 的 inset.bottom 可能错误的 bug(issue #218 #934),默认为 YES
  251. QMUICMI.shouldFixSearchBarMaskViewLayoutBug = YES; // ShouldFixSearchBarMaskViewLayoutBug : 是否自动修复 UISearchController.searchBar 被当作 tableHeaderView 使用时可能出现的布局 bug(issue #950)
  252. QMUICMI.sendAnalyticsToQMUITeam = YES; // SendAnalyticsToQMUITeam : 是否允许在 DEBUG 模式下上报 Bundle Identifier 和 Display Name 给 QMUI 统计用
  253. QMUICMI.dynamicPreferredValueForIPad = NO; // DynamicPreferredValueForIPad : 当 iPad 处于 Slide Over 或 Split View 分屏模式下,宏 `PreferredValueForXXX` 是否把 iPad 视为某种屏幕宽度近似的 iPhone 来取值。
  254. if (@available(iOS 13.0, *)) {
  255. QMUICMI.ignoreKVCAccessProhibited = NO; // IgnoreKVCAccessProhibited : 是否全局忽略 iOS 13 对 KVC 访问 UIKit 私有属性的限制
  256. QMUICMI.adjustScrollIndicatorInsetsByContentInsetAdjustment = YES; // AdjustScrollIndicatorInsetsByContentInsetAdjustment : 当将 UIScrollView.contentInsetAdjustmentBehavior 设为 UIScrollViewContentInsetAdjustmentNever 时,是否自动将 UIScrollView.automaticallyAdjustsScrollIndicatorInsets 设为 NO,以保证原本在 iOS 12 下的代码不用修改就能在 iOS 13 下正常控制滚动条的位置。
  257. }
  258. }
  259. // QMUI 2.3.0 版本里,配置表新增这个方法,返回 YES 表示在 App 启动时要自动应用这份配置表。仅当你的 App 里存在多份配置表时,才需要把除默认配置表之外的其他配置表的返回值改为 NO。
  260. - (BOOL)shouldApplyTemplateAutomatically {
  261. [QMUIThemeManagerCenter.defaultThemeManager addThemeIdentifier:self.themeName theme:self];
  262. NSString *selectedThemeIdentifier = [[NSUserDefaults standardUserDefaults] stringForKey:QDSelectedThemeIdentifier];
  263. BOOL result = [selectedThemeIdentifier isEqualToString:self.themeName] || (!selectedThemeIdentifier && !QMUIThemeManagerCenter.defaultThemeManager.currentThemeIdentifier);
  264. if (result) {
  265. QMUIThemeManagerCenter.defaultThemeManager.currentTheme = self;
  266. }
  267. return result;
  268. }
  269. #pragma mark - <QDThemeProtocol>
  270. - (UIColor *)themeBackgroundColor {
  271. return UIColorWhite;
  272. }
  273. - (UIColor *)themeBackgroundColorLighten {
  274. return self.themeBackgroundColor;
  275. }
  276. - (UIColor *)themeBackgroundColorHighlighted {
  277. return UIColorMake(238, 239, 241);
  278. }
  279. - (UIColor *)themeTintColor {
  280. return UIColorWhite;
  281. }
  282. - (UIColor *)themeTitleTextColor {
  283. return UIColorGray1;
  284. }
  285. - (UIColor *)themeMainTextColor {
  286. return UIColorGray3;
  287. }
  288. - (UIColor *)themeDescriptionTextColor {
  289. return UIColorGray5;
  290. }
  291. - (UIColor *)themePlaceholderColor {
  292. return UIColorGray8;
  293. }
  294. - (UIColor *)themeCodeColor {
  295. return self.themeTintColor;
  296. }
  297. - (UIColor *)themeSeparatorColor {
  298. return UIColorMake(222, 224, 226);
  299. }
  300. - (UIColor *)themeGridItemTintColor {
  301. return self.themeTintColor;
  302. }
  303. - (NSString *)themeName {
  304. return QDThemeIdentifierDefault;
  305. }
  306. @end