Невозможно одновременно удовлетворить ограничения ошибка заставляет мерцание экрана в IOS 9

Я получаю следующий журнал в моей консоли в XCode.

2016-10-12 16:48:13.218 xx[319:19209] 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:0x16c610c0 H:[JTImageButton:0x16c61120'\Ufffc(null)'(130)]>",
"<NSLayoutConstraint:0x16be02a0 '_UITemporaryLayoutWidth' H:[JTImageButton:0x16c61120'\Ufffc(null)'(1000)]>"
)

Will attempt to recover by breaking constraint 

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.

И мой экран мерцает, когда этот журнал происходит.

Как я могу решить это?

1 ответ

Решение

Вы даете свой JTImageButton горизонтальный размер 130, и после этого вы определяете другое ограничение, которое устанавливает горизонтальный размер до 1000. Удалите 1 из этих ограничений. Вы не можете определить несколько ограничений размера для одной оси.

Другие вопросы по тегам