Constraint issue with alert actionsheet.
trevorphillipscoding opened this issue · comments
Error
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
2020-04-23 15:21:48.556790-0600 Banky[71185:1795813] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x6000032b6080 UIView:0x7fb0ba45f9e0.width == - 16 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x6000032b6080 UIView:0x7fb0ba45f9e0.width == - 16 (active)>
This is what I'm calling and the above warning occurs.
ALRT.create(.actionSheet)
.addAction("Terms of Use") { _, _ in
self.performSegue(withIdentifier: "termsToWebView", sender: nil)
}
.addAction("Privacy Policy") { _, _ in
self.performSegue(withIdentifier: "privacyToWebView", sender: nil)
}
.addCancel()
.show()
I believe this is an iOS bug. It occurs even when you construct UIAlertController in a standard manner.
Closing