Xcode shows lengthy warnings to unsatisfiable auto layout constrains.So it is difficult to find other exceptions from the console among them. Is there any way to disable auto layout related warnings in Xcode?
Asked
Active
Viewed 4,457 times
21
-
1Have you been able to find an answer to this one? – TotoroTotoro Oct 03 '14 at 18:37
-
1No, could not find an answer – Makmeksum Oct 04 '14 at 10:40
-
Is there really still no answer?? – YichenBman Jun 23 '15 at 20:20
-
1This question badly needs an answer – TimWhiting Aug 17 '15 at 13:51
-
possible duplicate of [Disable autolayout constraint error messages in debug console output in Xcode](http://stackoverflow.com/questions/31239934/disable-autolayout-constraint-error-messages-in-debug-console-output-in-xcode) – Witold Skibniewski Sep 29 '15 at 15:04
-
Please check the date to see which one is the duplicate – Makmeksum Oct 01 '15 at 19:12
-
@Makmeksam if the answer is useful please accept it – vijeesh Mar 21 '16 at 14:32
3 Answers
14
Swift 4:
UserDefaults.standard.set(false, forKey: "_UIConstraintBasedLayoutLogUnsatisfiable")

Adam Bardon
- 3,829
- 7
- 38
- 73
9
[[NSUserDefaults standardUserDefaults] setValue:@(NO) forKey:@"_UIConstraintBasedLayoutLogUnsatisfiable"];
Add this code inside appdelegate. This will hide constraint error messages from console

vijeesh
- 1,317
- 1
- 17
- 32
-10
If you programmatically create a UIView
, there aren't any layout constraints defined. You have to add them manually. If you do have some layoutconstraints
configured for a certain view, they can be removed like so:
[view removeConstraints:view.constraints]

Divya Bhaloidiya
- 5,018
- 2
- 25
- 45

gajchtr
- 48
- 5
-
6This doesn't really answer the question. A lot of people use Auto Layout now, and not having constraints is not an option. – TotoroTotoro Oct 03 '14 at 18:36