Skip to content

Commit be25a1b

Browse files
author
molicechen
committed
4.2.2
1 parent 2060ccc commit be25a1b

62 files changed

Lines changed: 2078 additions & 1056 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

QMUIConfigurationTemplate/QMUIConfigurationTemplate.m

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ - (void)applyConfigurationTemplate {
8888

8989
#pragma mark - NavigationBar
9090

91+
QMUICMI.navBarContainerClasses = nil; // NavBarContainerClasses : NavigationBar 系列开关被用于 UIAppearance 时的生效范围(默认情况下除了用于 UIAppearance 外,还用于实现了 QMUINavigationControllerAppearanceDelegate 的 UIViewController),默认为 nil。当赋值为 nil 或者空数组时等效于 @[UINavigationController.class],也即对所有 UINavigationBar 生效,包括系统的通讯录(ContactsUI.framework)、打印等。当值不为空时,获取 UINavigationBar 的 appearance 请使用 UINavigationBar.qmui_appearanceConfigured 方法代替系统的 UINavigationBar.appearance。请保证这个配置项先于其他任意 NavBar 配置项执行。
9192
QMUICMI.navBarHighlightedAlpha = 0.2f; // NavBarHighlightedAlpha : QMUINavigationButton 在 highlighted 时的 alpha
9293
QMUICMI.navBarDisabledAlpha = 0.2f; // NavBarDisabledAlpha : QMUINavigationButton 在 disabled 时的 alpha
9394
QMUICMI.navBarButtonFont = nil; // NavBarButtonFont : QMUINavigationButtonTypeNormal 和 UINavigationBar 上的 UIBarButtonItem 的字体
@@ -97,7 +98,7 @@ - (void)applyConfigurationTemplate {
9798
QMUICMI.navBarShadowImageColor = nil; // NavBarShadowImageColor : UINavigationBar.shadowImage 的颜色,如果为 nil,则使用 NavBarShadowImage 的值,如果 NavBarShadowImage 也为 nil,则使用系统默认的分隔线。如果不为 nil,而 NavBarShadowImage 为 nil,则自动创建一张 1px 高的图并将其设置为 NavBarShadowImageColor 的颜色然后设置上去,如果 NavBarShadowImage 不为 nil 且 renderingMode 不为 UIImageRenderingModeAlwaysOriginal,则将 NavBarShadowImage 设置为 NavBarShadowImageColor 的颜色然后设置上去。
9899
QMUICMI.navBarBarTintColor = nil; // NavBarBarTintColor : UINavigationBar.barTintColor,也即背景色
99100
QMUICMI.navBarStyle = UIBarStyleDefault; // NavBarStyle : UINavigationBar 的 barStyle
100-
QMUICMI.navBarTintColor = nil; // NavBarTintColor : QMUINavigationController.navigationBar 的 tintColor,也即导航栏上面的按钮颜色,由于 tintColor 不支持 appearance,所以这里只支持 QMUINavigationController
101+
QMUICMI.navBarTintColor = nil; // NavBarTintColor : NavBarContainerClasses 里的 UINavigationBar 的 tintColor,也即导航栏上面的按钮颜色
101102
QMUICMI.navBarTitleColor = nil; // NavBarTitleColor : UINavigationBar 的标题颜色,以及 QMUINavigationTitleView 的默认文字颜色
102103
QMUICMI.navBarTitleFont = nil; // NavBarTitleFont : UINavigationBar 的标题字体,以及 QMUINavigationTitleView 的默认字体
103104
QMUICMI.navBarLargeTitleColor = nil; // NavBarLargeTitleColor : UINavigationBar 在大标题模式下的标题颜色,仅在 iOS 11 之后才有效
@@ -114,27 +115,30 @@ - (void)applyConfigurationTemplate {
114115

115116
#pragma mark - TabBar
116117

118+
QMUICMI.tabBarContainerClasses = nil; // TabBarContainerClasses : TabBar 系列开关的生效范围,默认为 nil,当赋值为 nil 或者空数组时等效于 @[UITabBarController.class],也即对所有 UITabBar 生效。当值不为空时,获取 UITabBar 的 appearance 请使用 UITabBar.qmui_appearanceConfigured 方法代替系统的 UITabBar.appearance。请保证这个配置项先于其他任意 TabBar 配置项执行。
117119
QMUICMI.tabBarBackgroundImage = nil; // TabBarBackgroundImage : UITabBar 的背景图
118120
QMUICMI.tabBarBarTintColor = nil; // TabBarBarTintColor : UITabBar 的 barTintColor,如果需要看到磨砂效果则应该提供半透明的色值
119121
QMUICMI.tabBarShadowImageColor = nil; // TabBarShadowImageColor : UITabBar 的 shadowImage 的颜色,会自动创建一张 1px 高的图片
120122
QMUICMI.tabBarStyle = UIBarStyleDefault; // TabBarStyle : UITabBar 的 barStyle
121123
QMUICMI.tabBarItemTitleFont = nil; // TabBarItemTitleFont : UITabBarItem 的标题字体
124+
QMUICMI.tabBarItemTitleFontSelected = nil; // TabBarItemTitleFontSelected : 选中的 UITabBarItem 的标题字体
122125
QMUICMI.tabBarItemTitleColor = nil; // TabBarItemTitleColor : 未选中的 UITabBarItem 的标题颜色
123126
QMUICMI.tabBarItemTitleColorSelected = nil; // TabBarItemTitleColorSelected : 选中的 UITabBarItem 的标题颜色
124127
QMUICMI.tabBarItemImageColor = nil; // TabBarItemImageColor : UITabBarItem 未选中时的图片颜色
125128
QMUICMI.tabBarItemImageColorSelected = nil; // TabBarItemImageColorSelected : UITabBarItem 选中时的图片颜色
126129

127130
#pragma mark - Toolbar
128131

132+
QMUICMI.toolBarContainerClasses = nil; // ToolBarContainerClasses : ToolBar 系列开关的生效范围,默认为 nil,当赋值为 nil 或者空数组时等效于 @[UINavigationController.class],也即对所有 UIToolbar 生效。当值不为空时,获取 UIToolbar 的 appearance 请使用 UIToolbar.qmui_appearanceConfigured 方法代替系统的 UIToolbar.appearance。请保证这个配置项先于其他任意 ToolBar 配置项执行。
129133
QMUICMI.toolBarHighlightedAlpha = 0.4f; // ToolBarHighlightedAlpha : QMUIToolbarButton 在 highlighted 状态下的 alpha
130134
QMUICMI.toolBarDisabledAlpha = 0.4f; // ToolBarDisabledAlpha : QMUIToolbarButton 在 disabled 状态下的 alpha
131-
QMUICMI.toolBarTintColor = nil; // ToolBarTintColor : UIToolbar 的 tintColor,以及 QMUIToolbarButton normal 状态下的文字颜色
135+
QMUICMI.toolBarTintColor = nil; // ToolBarTintColor : NavBarContainerClasses 里的 UIToolbar 的 tintColor,以及 QMUIToolbarButton normal 状态下的文字颜色
132136
QMUICMI.toolBarTintColorHighlighted = [ToolBarTintColor colorWithAlphaComponent:ToolBarHighlightedAlpha]; // ToolBarTintColorHighlighted : QMUIToolbarButton 在 highlighted 状态下的文字颜色
133137
QMUICMI.toolBarTintColorDisabled = [ToolBarTintColor colorWithAlphaComponent:ToolBarDisabledAlpha]; // ToolBarTintColorDisabled : QMUIToolbarButton 在 disabled 状态下的文字颜色
134-
QMUICMI.toolBarBackgroundImage = nil; // ToolBarBackgroundImage : UIToolbar 的背景图
135-
QMUICMI.toolBarBarTintColor = nil; // ToolBarBarTintColor : UIToolbar 的 tintColor
136-
QMUICMI.toolBarShadowImageColor = nil; // ToolBarShadowImageColor : UIToolbar 的 shadowImage 的颜色,会自动创建一张 1px 高的图片
137-
QMUICMI.toolBarStyle = UIBarStyleDefault; // ToolBarStyle : UIToolbar 的 barStyle
138+
QMUICMI.toolBarBackgroundImage = nil; // ToolBarBackgroundImage : NavBarContainerClasses 里的 UIToolbar 的背景图
139+
QMUICMI.toolBarBarTintColor = nil; // ToolBarBarTintColor : NavBarContainerClasses 里的 UIToolbar 的 tintColor
140+
QMUICMI.toolBarShadowImageColor = nil; // ToolBarShadowImageColor : NavBarContainerClasses 里的 UIToolbar 的 shadowImage 的颜色,会自动创建一张 1px 高的图片
141+
QMUICMI.toolBarStyle = UIBarStyleDefault; // ToolBarStyle : NavBarContainerClasses 里的 UIToolbar 的 barStyle
138142
QMUICMI.toolBarButtonFont = nil; // ToolBarButtonFont : QMUIToolbarButton 的字体
139143

140144
#pragma mark - SearchBar
@@ -264,7 +268,6 @@ - (void)applyConfigurationTemplate {
264268
QMUICMI.preventConcurrentNavigationControllerTransitions = YES; // PreventConcurrentNavigationControllerTransitions : 自动保护 QMUINavigationController 在上一次 push/pop 尚未结束的时候就进行下一次 push/pop 的行为,避免产生 crash
265269
QMUICMI.navigationBarHiddenInitially = NO; // NavigationBarHiddenInitially : QMUINavigationControllerDelegate preferredNavigationBarHidden 的初始值,默认为NO
266270
QMUICMI.shouldFixTabBarTransitionBugInIPhoneX = NO; // ShouldFixTabBarTransitionBugInIPhoneX : 是否需要自动修复 iOS 11 下,iPhone X 的设备在 push 界面时,tabBar 会瞬间往上跳的 bug
267-
QMUICMI.shouldFixTabBarButtonBugForAll = NO; // ShouldFixTabBarButtonBugForAll : 是否要对 iOS 12.1.1 及以后的版本也修复手势返回时 tabBarButton 布局错误的 bug(issue #410),默认为 NO
268271
QMUICMI.shouldFixTabBarSafeAreaInsetsBug = NO; // ShouldFixTabBarSafeAreaInsetsBug : 是否要对 iOS 11 及以后的版本修复当存在 UITabBar 时,UIScrollView 的 inset.bottom 可能错误的 bug(issue #218 #934),默认为 YES
269272
QMUICMI.shouldFixSearchBarMaskViewLayoutBug = NO; // ShouldFixSearchBarMaskViewLayoutBug : 是否自动修复 UISearchController.searchBar 被当作 tableHeaderView 使用时可能出现的布局 bug(issue #950)
270273
QMUICMI.shouldPrintQMUIWarnLogToConsole = IS_DEBUG; // ShouldPrintQMUIWarnLogToConsole : 是否在出现 QMUILogWarn 时自动把这些 log 以 QMUIConsole 的方式显示到设备屏幕上

QMUIKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "QMUIKit"
3-
s.version = "4.2.1"
3+
s.version = "4.2.2"
44
s.summary = "致力于提高项目 UI 开发效率的解决方案"
55
s.description = <<-DESC
66
QMUI iOS 是一个致力于提高项目 UI 开发效率的解决方案,其设计目的是用于辅助快速搭建一个具备基本设计还原效果的 iOS 项目,同时利用自身提供的丰富控件及兼容处理, 让开发者能专注于业务需求而无需耗费精力在基础代码的设计上。不管是新项目的创建,或是已有项目的维护,均可使开发效率和项目质量得到大幅度提升。

QMUIKit/QMUIComponents/CALayer+QMUIViewAnimation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
2727
} completion:nil];
2828
@endcode
2929
*/
30-
@property(nonatomic, assign) BOOL qmui_viewAnimaitonEnabled;
30+
@property(nonatomic, assign) BOOL qmui_viewAnimationEnabled;
3131

3232
@end
3333

QMUIKit/QMUIComponents/CALayer+QMUIViewAnimation.m

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ + (void)load {
5959
dispatch_once(&onceToken, ^{
6060
OverrideImplementation([CALayer class], @selector(addAnimation:forKey:), ^id(__unsafe_unretained Class originClass, SEL originCMD, IMP (^originalIMPProvider)(void)) {
6161
return ^(CALayer *selfObject, CAAnimation *animation, NSString *key) {
62-
if (selfObject.qmui_viewAnimaitonEnabled) {
62+
if (selfObject.qmui_viewAnimationEnabled) {
6363
BOOL isViewAnimtion = [animation isKindOfClass:CABasicAnimation.class] && [animation.delegate isKindOfClass:NSClassFromString(@"UIViewAnimationState")];
6464
if (isViewAnimtion) {
6565
// 这里需要清空 fromValue 和 toValue,后面会在 CAMediaTimingCopyRenderTiming 取到这个 animtion 的参数并设置到 CATransaction 中,让 Layer 改变属性时,运用上这些动画
@@ -79,20 +79,20 @@ + (void)load {
7979
}
8080

8181

82-
static char kAssociatedObjectKey_qmuiviewAnimaitonEnabled;
83-
- (void)setQmui_viewAnimaitonEnabled:(BOOL)qmui_viewAnimaitonEnabled {
82+
static char kAssociatedObjectKey_qmuiviewAnimationEnabled;
83+
- (void)setQmui_viewAnimationEnabled:(BOOL)qmui_viewAnimationEnabled {
8484
NSAssert(!self.qmui_isRootLayerOfView, @"UIView 本身的 Layer 无须开启该属性");
85-
objc_setAssociatedObject(self, &kAssociatedObjectKey_qmuiviewAnimaitonEnabled, @(qmui_viewAnimaitonEnabled), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
86-
if (qmui_viewAnimaitonEnabled) {
85+
objc_setAssociatedObject(self, &kAssociatedObjectKey_qmuiviewAnimationEnabled, @(qmui_viewAnimationEnabled), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
86+
if (qmui_viewAnimationEnabled) {
8787
self.qmui_multipleDelegatesEnabled = YES;
8888
self.delegate = [_QMUICALayerDelegator sharedDelegator];
8989
} else {
9090
[self qmui_removeDelegate:[_QMUICALayerDelegator sharedDelegator]];
9191
}
9292
}
9393

94-
- (BOOL)qmui_viewAnimaitonEnabled {
95-
return [((NSNumber *)objc_getAssociatedObject(self, &kAssociatedObjectKey_qmuiviewAnimaitonEnabled)) boolValue];
94+
- (BOOL)qmui_viewAnimationEnabled {
95+
return [((NSNumber *)objc_getAssociatedObject(self, &kAssociatedObjectKey_qmuiviewAnimationEnabled)) boolValue];
9696
}
9797

9898
@end

QMUIKit/QMUIComponents/NavigationBarTransition/UINavigationBar+Transition.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
//
10-
// QMUINavigationBar+Transition.h
10+
// UINavigationBar+Transition.h
1111
// qmui
1212
//
1313
// Created by QMUI Team on 11/25/16.

QMUIKit/QMUIComponents/NavigationBarTransition/UINavigationBar+Transition.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88

99
//
10-
// QMUINavigationBar+Transition.m
10+
// UINavigationBar+Transition.m
1111
// qmui
1212
//
1313
// Created by QMUI Team on 11/25/16.

0 commit comments

Comments
 (0)