【问题标题】:How to get NSLayoutConstraint's identifier by Its pointer?如何通过其指针获取 NSLayoutConstraints 标识符?
【发布时间】:2015-10-28 05:22:45
【问题描述】:

我在 Storyboard identifier 中为每个约束设置:

现在unsatisfiable constraints 出现错误。我尝试通过打印约束的指针来调试它:

po 0x17db78d0

现在为了调查它是什么约束,我想打印它的identifier,就像:

po 0x17db78d0.identifer.

...但它不起作用。我收到一个错误:

错误:十六进制浮点常量需要指数

error: 1 解析表达式错误

因此,如何打印特定 NSLayoutConstraint 的标识符?

【问题讨论】:

标签: ios debugging nslayoutconstraint xcode7-beta4


【解决方案1】:

po ((NSLayoutConstraint *)0x17db78d0).identifier

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-02-26
    • 2011-09-17
    • 2021-06-03
    • 1970-01-01
    • 2021-12-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多