例如,由于某种原因在initWithNibName:bundle:我看不到self.view.bounds.size.width的值,必须停止程序并使用NSLog.
当我在手表中输入self.view.bounds.size.width时,我会在右侧显示“输入表达式”消息.
当我在调试控制台中键入print self.view.bounds.size.width时,出现以下错误:
当我在手表中输入self.view.bounds.size.width时,我会在右侧显示“输入表达式”消息.
当我在调试控制台中键入print self.view.bounds.size.width时,出现以下错误:
error: unsupported expression with unknown type error: 1 errors parsing expression
有没有办法看到我使用NSLog可以看到的所有值?
编辑:通过@ Abizern的建议尝试了p self.view.bounds.size.width和po self.view.bounds.size.width – 相同的结果.
解决方法
尝试
p self.view.bounds.size.width
或者:
po self.view
p是一个适用于值的简单打印
po用于打印对象,它基本上给出与NSLog相同的结果