Hold a reference to the pointer interaction to try to get it to stop crashing. Issue #2034
This commit is contained in:
parent
d5a4f1625a
commit
e2267d14ee
@ -72,13 +72,17 @@ class MasterFeedTableViewSectionHeader: UITableViewHeaderFooterView {
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
private let unreadCountView = MasterFeedUnreadCountView(frame: CGRect.zero)
|
private let unreadCountView = MasterFeedUnreadCountView(frame: CGRect.zero)
|
||||||
|
|
||||||
|
@available(iOS 13.4, *)
|
||||||
|
private(set) lazy var disclosurePointerInteraction = UIPointerInteraction()
|
||||||
|
|
||||||
private lazy var disclosureButton: UIButton = {
|
private lazy var disclosureButton: UIButton = {
|
||||||
let button = NonIntrinsicButton()
|
let button = NonIntrinsicButton()
|
||||||
button.tintColor = UIColor.tertiaryLabel
|
button.tintColor = UIColor.tertiaryLabel
|
||||||
button.setImage(AppAssets.disclosureImage, for: .normal)
|
button.setImage(AppAssets.disclosureImage, for: .normal)
|
||||||
button.contentMode = .center
|
button.contentMode = .center
|
||||||
if #available(iOS 13.4, *) {
|
if #available(iOS 13.4, *) {
|
||||||
button.addInteraction(UIPointerInteraction())
|
button.addInteraction(disclosurePointerInteraction)
|
||||||
}
|
}
|
||||||
button.addTarget(self, action: #selector(toggleDisclosure), for: .touchUpInside)
|
button.addTarget(self, action: #selector(toggleDisclosure), for: .touchUpInside)
|
||||||
return button
|
return button
|
||||||
|
Loading…
x
Reference in New Issue
Block a user