How to get NSLayoutConstraint's identifier by

2019-07-11 03:53发布

问题:

I setup in Storyboard identifier for each constraint:

Now I get error with unsatisfiable constraints. I try to debug this by printing constraint's pointer:

po 0x17db78d0

Now to order investigate what constraint it is, I would like to print its identifier just like:

po 0x17db78d0.identifer.

...but it is not working. I get an error:

error: hexadecimal floating constants require an exponent

error: 1 errors parsing expression

Hence, how to print identifier for specific NSLayoutConstraint?

回答1:

po ((NSLayoutConstraint *)0x17db78d0).identifier