なんか矛盾したようなUI設計になってる時にこれは出るらしい。Appleのフォーラムにも似たような状態で原因がわからんみたいなのがあったけど、結局矛盾された状態に出るので、いろんなパターンがあると思われるので、個人的に遭遇したことをメモしておきたいと思います。

表示されたエラーログ

[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:0x2832a4a50 'accessoryView.bottom' _UIRemoteKeyboardPlaceholderView:0x141d1e760.bottom == _UIKBCompatInputView:0x141da5bf0.top (active)>",
"<NSLayoutConstraint:0x2832bd360 'assistantHeight' SystemInputAssistantView.height == 45 (active, names: SystemInputAssistantView:0x141e05470 )>",
"<NSLayoutConstraint:0x2832a0eb0 'assistantView.bottom' SystemInputAssistantView.bottom == _UIKBCompatInputView:0x141da5bf0.top (active, names: SystemInputAssistantView:0x141e05470 )>",
"<NSLayoutConstraint:0x2832a0e10 'assistantView.top' V:[_UIRemoteKeyboardPlaceholderView:0x141d1e760]-(0)-[SystemInputAssistantView] (active, names: SystemInputAssistantView:0x141e05470 )>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x2832a0e10 'assistantView.top' V:[_UIRemoteKeyboardPlaceholderView:0x141d1e760]-(0)-[SystemInputAssistantView] (active, names: SystemInputAssistantView:0x141e05470 )>

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.

はは…なるほどね…。

さっぱりわからんが、ただ何か矛盾したような設計があるわよ?てきな話と解釈した。

overlayで画像の枠線を消したら直った

コードは省略するとして、以下の流れを組んでいたんだけど

1.投稿画面で、画像が投稿できる。選択された画像はUIImageでサムネイル表示される。
2.選択されていない場合は、plusの画像に幅を大きくして、overrayのRectangleで囲いをつけた
 投稿されたらここに画像が表示されるよ というブランクの枠を用意した
3.カメラボタンを押すとカメラが起動
4.撮影し、OKすると、Rectangleの中に撮影した画像が入る
5.ここで該当のエラーが発生

よくわからんが、画像の大きさのframeとRectangleの大きさで何か矛盾でもあったのか?
ひとまず、overrayの枠線を消したら、エラーでなくなった

同じカテゴリの記事

コメント