Fix break constraint UIActionSheet

Add an extension and call it before present.

1
2
3
4
5
6
7
8
9
10
11
actionSheetController.pruneNegativeWidthConstraints()

extension UIAlertController {
func pruneNegativeWidthConstraints() {
for subView in self.view.subviews {
for constraint in subView.constraints where constraint.debugDescription.contains("width == - 16") {
subView.removeConstraint(constraint)
}
}
}
}
© 2020 Vien's Blog All Rights Reserved.
Theme by hiero