整理一下更新后遇到的问题

1、TYAttributedLabel 崩溃

Xcode12 iOS14 适配开发修改方法如下图
Xcode12 iOS14 适配开发输入:-Xclang -fcompatibility-qualified-id-block-type-checking

2、UIPickerView 数组越界 崩溃

以前隐藏两条黑线,现在崩溃
[cityPicker.subviews objectAtIndex:1].backgroundColor = [UIColor clearColor];
[cityPicker.subviews objectAtIndex:2].backgroundColor = [UIColor clearColor];
pickerView.subviews的视图结构有变化,因更新新版本就不分析了,
目前
Xcode12 iOS14 适配开发
分析视图尺寸(隐藏运行,是一个半透明视图),
换子视图下标 1 隐藏
[_cityPicker.subviews objectAtIndex:1].backgroundColor = [UIColor clearColor];

3.UIDatePicker 显示视图及横线

Xcode12 iOS14 适配开发样式修改:

if (@available(iOS 14.0, *)) {
_birthdayPicker.preferredDatePickerStyle = UIDatePickerStyleWheels;
} else {
// Fallback on earlier versions
}
隐藏横线:
_birthdayPicker.subviews[0].subviews[1].backgroundColor
= [UIColor clearColor];

4、

持续更新中。。。

相关文章:

  • 2021-12-04
  • 2021-06-04
  • 2021-06-15
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-30
  • 2021-07-29
  • 2022-12-23
  • 2021-12-22
  • 2021-07-31
  • 2022-12-23
  • 2021-10-13
相关资源
相似解决方案