Skip to content

4.1.0

Compare
Choose a tag to compare
@MoLice MoLice released this 27 Mar 10:28
· 104 commits to master since this release

新增功能

  1. 增加 QMUIAppearance 组件用于让非 UIViewNSObject 子类也可以使用 UIAppearance 能力,并将项目里相关组件都改为用 QMUIAppearanceImagePickerLibraryQMUIAlertControllerQMUIDialogViewControllerQMUIImagePreviewViewControllerQMUIModalPresentationViewControllerQMUIMoreOperationController
  2. 增加 NSObject (QMUIAppearnace),提供方法 -qmui_applyAppearance 用于将当前 Class 的 appearance 应用到当前实例上,该方法支持 UIView 和非 UIView 的任意对象。
  3. NSObject (QMUI) 增加 qmui_canGetValueForKey:qmui_canSetValueForKey: 用于判断某个给定的 key 是否可以用于当前对象的 KVC。
  4. #920 UINavigationController (QMU) 增加属性 qmui_interactivePopGestureRecognizerDelegate 用于获取系统原始的 interactivePopGestureRecognizer.delegate 的值。
  5. UIViewController (QMUI) 增加属性 qmui_prefersStatusBarHiddenBlockqmui_preferredStatusBarStyleBlockqmui_preferredStatusBarUpdateAnimationBlockqmui_prefersHomeIndicatorAutoHiddenBlock 便于在非继承的情况下依然能控制界面状态栏、Home Indicator。
  6. QMUIAlertController 增加属性 sheetButtonColumnCount 支持一行显示多个按钮。
  7. QMUIModalPresentationViewController 新增 willHideByDimmingViewTappedBlock 属性用于监听浮层即将被隐藏的时机。
  8. QMUIRuntime 增加 qmui_getProjectClassList() 函数用于获取业务项目的 Class 列表(不包含系统 Class 和引入的第三方 Framework)。
  9. QMUIOrderedDictionary 支持下标的语法操作。
  10. #691 QMUIPopupContainerView 增加 QMUIPopupContainerViewLayoutDirectionLeftQMUIPopupContainerViewLayoutDirectionRight 以支持水平方向的展示,QMUI Demo 也更新了展示示例。
  11. QMUIPopupContainerView 支持用 contentMode 切换内置图片、文本的布局方式。
  12. 配置表增加 TextFieldTextColor 用于全局设置 QMUITextFieldQMUITextViewtextColor,对 UITextFieldUITextView 不影响。

会带来 QMUI 新旧版本兼容问题的更新

  1. 将 4.0.0-beta 就标记为已废弃的方法 shouldHoldBackButtonEventcanPopViewController 删除。

如何适配新版

  1. 全局 Matching Word 搜索“shouldHoldBackButtonEvent”、“canPopViewController”,将用到的地方改为新的方法“ shouldPopViewControllerByBackButtonOrPopGesture”。
  2. 如果有使用配置表,请将以下代码添加到配置表:
QMUICMI.textFieldTextColor = nil; // TextFieldTextColor : QMUITextField、QMUITextView 的 textColor,不影响 UIKit 的输入框
QMUICMI.shouldFixTabBarSafeAreaInsetsBugForNotchedScreen = NO; // ShouldFixTabBarSafeAreaInsetsBugForNotchedScreen : 是否要对 iOS 11 及以后的版本修复全面屏设备下 pop 界面时 UIScrollView 的 inset 会跳动导致滚动位置受影响的 bug(issue #934),默认为 NO

Bugfix

  1. #884 修复某些 UIModalPresentationStyle 情况下,present 起来的 viewController 无法响应 QMUITheme 切换的 bug。
  2. #900 修复 QMUIPieProgressView 在以动画的形式修改 progress 过程中 borderInset 失效的 bug。
  3. #906 修复 QMUICommonTableViewController 可能出现提前触发 loadView 的 bug。
  4. #914 优化配置表里对 StatusbarStyleLightInitially 的注释。
  5. #923 修复 QMUITheme 会强制用配置表的 KeyboardAppearance 值覆盖业务的值,导致某些界面如果想要与全局统一的键盘外观不一致,则无法实现的 bug。
  6. #930 修复与 DoraemonKit 冲突引发 dispatch_once 死锁的问题。
  7. #934 修复全面屏设备下,带 UITabBar 的界面在 push/pop 后,UIScrollView 的滚动位置可能发生变化的系统 bug,但默认代码是屏蔽的,需要手动将配置表里的 ShouldFixTabBarSafeAreaInsetsBugForNotchedScreen 置为 YES 才可以,具体请看如何适配新版
  8. 修复 QMUICollectionViewPagingLayout 在某些时候滑动时会滚动到错误 item 的 bug。
  9. 修复 QMUIImagePreviewView 在快速滚动时某些 index 的 imagePreviewView:willScrollHalfToIndex: 可能没有被触发的问题。
  10. 修复 QMUIFloatLayoutView.itemMargins.top 不生效的 bug。
  11. 修复 QMUIModalPresentationViewController 如果使用 contentViewController 的情况下无法重复 show 的问题。
  12. 修复 QMUIModalPresentationViewController 如果使用 contentViewController 的情况下,在调用 show 之前无法获取到 qmui_modalPresentationViewController 的问题。
  13. 修复 QMUIMultipleDelegates 无法使用 valueForKey:setValue:forKey: 的问题。
  14. 修复 iOS 13.4 下 UINavigationController 可能出现手势返回异常的情况。