4

I am having issues with Auto Layout, getting "Unable to simultaneously satisfy constraints." error.

Now I have added identifiers to all my constraints, however, the conflicting constraints seem not to be created by me since I only see my identifiers in couple of the conflicting constraints.

My question is, if I have such a description of the constraint:

<NSLayoutConstraint:0x7f8dca498410 V:[UIView:0x7f8dca493010]-(0)-[UILabel:0x7f8dca493610]>

how can I find out which UIView this is and which UILabel this is. I know I can do po 0x7f8dca493010, but how can I print the properties of my view, best would be to print e.g. the name I give to the view in IB?

Banana
  • 4,010
  • 9
  • 33
  • 49

1 Answers1

15

Use this command to print all view

(lldb) po [[[UIApplication sharedApplication] keyWindow] recursiveDescription]

Then command + F to find the address

Then,with the help of View Debugging left side and the log to locate the View

Also, If you are familiar with LLDB,you can execute any code you want

lldb) e UIView *$view = (UIView *)0x7fb3b248d860
(lldb) po [$view superview]
<UIView: 0x7fb3b248d4e0; frame = (0 0; 414 736); autoresize = W+H; layer = <CALayer: 0x7fb3b248cca0>>
Leo
  • 24,596
  • 11
  • 71
  • 92
  • 1
    How would this be in Swift? I tried `po UIApplication.sharedApplication().keyWindow().recursiveDescription()`, but I get `error: called object type 'id' is not a function or function pointer` – Banana Nov 09 '15 at 12:22
  • I test with a swift project,the command I post works in LLDB. You just need to replace the address with the one you find – Leo Nov 09 '15 at 12:23