Skip to content

1.7.2

Compare
Choose a tag to compare
@MoLice MoLice released this 26 Jun 09:27
· 472 commits to master since this release

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

  1. 配置表开关 HidesBottomBarWhenPushedInitially 的默认值从 YES 改为 NO,以保持与系统的默认值一致。
  2. 配置表 UIColorForBackgroundTableViewBackgroundColorTableViewGroupedBackgroundColor 的默认值改为 nil,以减少对项目的侵入性。
  3. 将 UIViewController (QMUI) qmui_isTransitioningTypePresented 重命名为 qmui_isPresented,并修复原本的实现错误。
  4. QMUICommonTableViewControllerdidInitializedWithStyle: 方法开放到.h 里提供给子类重写。
  5. 删除 QMUICommonViewController willPopViewControllerdidPopViewController 方法,替换为新增的 QMUINavigationControllerDelegate 方法:willPopInNavigationControllerWithAnimated:didPopInNavigationControllerWithAnimated:
  6. 重构 QMUIStaticTableViewCellData,增加更多功能的同时提供更便捷的使用方式。

如何适配新版

使用者若从旧版更新到 1.7.2,需要做以下几步适配工作(直接使用新版的请略过这段):

  1. 如果你的项目中存在 UITabBarController,并且项目使用了配置表,则请检查 tabBarController 每个界面的 tabBar 显隐是否有问题。
  2. 如果项目使用了配置表,请检查每个继承自 QMUICommonViewController 的界面的背景色是否正确。
  3. 把项目里的 qmui_isTransitioningTypePresented 全局搜索替换为 qmui_isPresented
  4. 对于 QMUICommonTableViewController 的子类,建议把重写 initWithStyle: 方法改为重写 didInitializedWithStyle:,以同时兼容代码使用和 storyboard 使用(非必须)。
  5. 将项目里重写过的 willPopViewControllerdidPopViewController 方法都改为用新的 QMUINavigationControllerDelegate 方法:willPopInNavigationControllerWithAnimated:didPopInNavigationControllerWithAnimated:
  6. 以新的方式使用 QMUIStaticTableViewCellData,具体使用方式请查看注释或 QMUI Demo。
  7. 按照最新的配置表更新项目里的配置表,新增开关包括:TabBarItemTitleFontTableViewCellDetailButtonImageTableViewCellSpacingBetweenDetailButtonAndDisclosureIndicatorAutomaticallyRotateDeviceOrientation

其他更新

  1. 新增 QMUIMarqueeLabel 用于实现跑马灯效果。
  2. NSString (QMUI) 增加 qmui_stringByConcat: 方法用于拼接字符串。
  3. QMUINavigationControllerDelegate 新增方法 preferredNavigationBarHiddenState 用于控制每个界面的导航栏的显隐。
  4. QMUINavigationControllerDelegate 新增方法 viewControllerKeepingAppearWhenSetViewControllerWithAnimated: 用于捕捉通过 setViewControllers: 方式修改界面的堆栈时的界面刷新时机。
  5. 修复 QMUINavigationController 在调用 popToViewController:animated:popToRootViewControllerAnimated:setViewControllers:animated: 这 3 个方法时只会触发第一个被 pop 的 viewController 的 willPop、didPop 方法,其他同样也被 pop 的 viewController 的这两个方法却不会被调用的 bug。
  6. 重新整理 QMUICommonViewController supportedOrientationMask 属性的功能,保证在支持不同方向的界面之间互相切换时屏幕能正确旋转。
  7. QMUIHelper (Orientation) 增加方法 rotateToDeviceOrientation: 用于主动改变屏幕方向。
  8. 让 QMUI 也支持 iOS 8 控制状态栏的那些接口,至于用系统接口还是用 QMUIHelper 就看 Info.plist 里 View controller-based status bar appearance 的值被设置为什么。
  9. UIImage (QMUI) 增加 QMUIImageShapeDetailButtonImage 形状用于生成一个列表右边的 i 详情按钮图片
  10. 为 UIViewController、UINavigationController、UITabBarController、QMUICommonTableViewController 增加详细的 description。
  11. 配置表增加 TabBarItemTitleFont 用于修改 UITabBarItem 的文字字体。
  12. 配置表增加 TableViewCellDetailButtonImageTableViewCellSpacingBetweenDetailButtonAndDisclosureIndicator 属性用于设置 QMUITableViewCell 右边显示的 i 按钮图片。
  13. 配置表增加开关 AutomaticallyRotateDeviceOrientation 用于控制是否要自动在界面切换时根据界面支持的方向的不同而主动旋转。