如何通过其指针获取NSLayoutConstraint的标识符? [英] How to get NSLayoutConstraint's identifier by Its pointer?

查看:245
本文介绍了如何通过其指针获取NSLayoutConstraint的标识符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在每个限制条件下,我在Storyboard 标识符中设置

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

错误:1错误解析表达式

error: 1 errors parsing expression

因此,如何打印特定 NSLayoutConstraint

推荐答案

po((NSLayoutConstraint *)0x17db78d0).identifier

这篇关于如何通过其指针获取NSLayoutConstraint的标识符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆