Swift UI元素在iOS 13中变得不可见
将iPhone升级到iOS 13后,我的一个应用程序缺少一些UI元素Swift UI元素在iOS 13中变得不可见,swift,user-interface,uinavigationcontroller,mkannotationview,Swift,User Interface,Uinavigationcontroller,Mkannotationview,将iPhone升级到iOS 13后,我的一个应用程序缺少一些UI元素 导航控制器中的back bar按钮项,在viewDidLoad中声明如下: 我可以通过向下滑动关闭视图控制器,仍然可以按LeftBarButtonim应该在的位置执行func handelCancel。所以按钮是不可见的,但它仍然存在 我在mapKitView上有集群注释,它在viewDidLoad中声明如下: 并具有自定义类: class ClusterView: MKMarkerAnnotationView {
class ClusterView: MKMarkerAnnotationView {
override var annotation: MKAnnotation? {
willSet {
markerTintColor = UIColor(r: 247, g: 154, b: 16)
let button = UIButton(type: .detailDisclosure)
isEnabled = true
rightCalloutAccessoryView = button
}
}
}
看不到集群注释变得不可能,但如果我放大注释,就会看到集群注释
在配备iOS 12的设备上,一切正常。我应该做哪些更改以使这些元素再次可见?您确定没有按钮吗?或者只是看不见?导航栏的色调是什么?设置左键和右键有什么区别?您的物品是依靠色彩还是使用textAttributes来设置样式?你读过《UIBarbuttoneMappearance》吗?一些旧的样式(不是tintColor)在iOS 13上已经不起作用了?
mapKitView.register(ClusterView.self, forAnnotationViewWithReuseIdentifier: MKMapViewDefaultClusterAnnotationViewReuseIdentifier)
class ClusterView: MKMarkerAnnotationView {
override var annotation: MKAnnotation? {
willSet {
markerTintColor = UIColor(r: 247, g: 154, b: 16)
let button = UIButton(type: .detailDisclosure)
isEnabled = true
rightCalloutAccessoryView = button
}
}
}