ㅋ2022-04-26 13:03:40.451472+0900 DoGit[4494:107137] [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:0x6000023de9e0 UIView:0x13fd292b0.bottom == UIView:0x140f76c30.bottom (active)>",
"<NSLayoutConstraint:0x6000023de8f0 UIView:0x13fd292b0.top == UILayoutGuide:0x600003e14d20'UIViewSafeAreaLayoutGuide'.top + 844 (active)>",
"<NSLayoutConstraint:0x6000023de760 'UIView-Encapsulated-Layout-Height' UIView:0x140f76c30.height == 844 (active)>",
"<NSLayoutConstraint:0x6000023de580 'UIViewSafeAreaLayoutGuide-top' V:|-(47)-[UILayoutGuide:0x600003e14d20'UIViewSafeAreaLayoutGuide'] (active, names: '|':UIView:0x140f76c30 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x6000023de9e0 UIView:0x13fd292b0.bottom == UIView:0x140f76c30.bottom (active)>
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.
레이아웃이 깨진 것 같으니 symbolic breakpoint (UIViewAlertForUnsatisfiableConstraints) 를 만들어서 디버깅해봐라라는 메세지를 담고 있는 것을 알 수 있습니다.
symbolic breakpoint 만드는 법
디버깅 창에서 + 를 눌러서 Symbolic Breadkpoint를 생성합니다.
Symbol 부분에 UIViewAlertForUnsatisfiableConstraints 를 적어줍니다.
프로젝트를 다시 실행하고 콘솔창에 에러가 발생한 화면으로 가면 오류가 발생한 지점에서 멈추게 됩니다.
View Process by Thread을 선택하여 스레드 call stack을 확인하면 됩니다.
아래 -> 위 순서가 실행된 순서입니다.
콘솔창 메세지로 확인하는 방법
"<NSLayoutConstraint:0x6000023de9e0 UIView:0x13fd292b0.bottom == UIView:0x140f76c30.bottom (active)>",
"<NSLayoutConstraint:0x6000023de8f0 UIView:0x13fd292b0.top == UILayoutGuide:0x600003e14d20'UIViewSafeAreaLayoutGuide'.top + 844 (active)>",
"<NSLayoutConstraint:0x6000023de760 'UIView-Encapsulated-Layout-Height' UIView:0x140f76c30.height == 844 (active)>",
"<NSLayoutConstraint:0x6000023de580 'UIViewSafeAreaLayoutGuide-top' V:|-(47)-[UILayoutGuide:0x600003e14d20'UIViewSafeAreaLayoutGuide'] (active, names: '|':UIView:0x140f76c30 )>"
이 메세지를 여기 사이트에 입력하면 어떤 조건인지 알려줍니다.
https://www.wtfautolayout.com/
이런식!
+) UI 계층 보기.. 신기
'iOS > STUDY' 카테고리의 다른 글
[iOS] 카카오 로그인 이해하기 (0) | 2022.05.18 |
---|---|
[iOS] UIToolbar 이슈 (UIToolbarContentView, UIButtonBarStackView) (0) | 2022.04.29 |
[iOS] cellRegistration: cell 배경색 바꾸기 (0) | 2022.04.25 |
[iOS] reloadItems, reconfigureItems 차이점 (1) | 2022.04.23 |
[iOS] CAGradientLayer (그라데이션 배경) (1) | 2022.04.05 |