Closed apiapia closed 7 years ago
稍等,我在demo示例一下
用photoBrowser来present,我已更新代码。对应cocoapods 0.3.5
咦。我用photoBrowser 来present一个UIAlertController(actionSheet)的时候 会
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.
2019-08-29 11:23:26.375017+0800 Runner[449:49445] [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:0x2833367b0 UIView:0x123e89870.width == - 16 (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x2833367b0 UIView:0x123e89870.width == - 16 (active)>
@thecorsair Demo里面也有present ActionSheet,你运行那个看看有没问题,看能不能找到原因?
func photoBrowser(_ photoBrowser: PhotoBrowser, didLongPressForIndex index: Int, image: UIImage) { print("长按,图片size:(image.size)") imageViewLongPressGestureRecognizer(image) }
上面这样子提示 下列错误,也无法弹出框 2017-08-30 17:39:46.562 PhotoBrowser[7622:1035904] Warning: Attempt to present <UIAlertController: 0x7fbe2d912cf0> on <PhotoBrowser.MomentsViewController: 0x7fbe2b606020> which is already presenting <JXPhotoBrowser.PhotoBrowser: 0x7fbe2b50e0d0>