Reputation: 463
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?
Upvotes: 21
Views: 4546
Reputation: 3889
Swift 4:
UserDefaults.standard.set(false, forKey: "_UIConstraintBasedLayoutLogUnsatisfiable")
Upvotes: 13
Reputation: 1327
[[NSUserDefaults standardUserDefaults] setValue:@(NO) forKey:@"_UIConstraintBasedLayoutLogUnsatisfiable"];
Add this code inside appdelegate. This will hide constraint error messages from console
Upvotes: 9
Reputation: 48
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]
Upvotes: -10