_subtreeDescription输出中的值是什么意思?

时间:2014-06-16 08:02:59

标签: macos layout xib

在自定义滚动视图上调用_subtreeDescription会显示:

Seohtracker devel [22556:303] [AF O WLU] h = - & - v = - & - EHGraph_scroll 0x100c52f20 f =(367,169,250,168)b =( - )=> _NSViewBackingLayer(0x101a77500)a = {0,0} p = {367,169} b =(0,0,250,168)superlayer = 0x101a756f0 TILED = no TIME drawRect:min / mean / max 0.00 / 0.00 / 0.00 ms

pb似乎是从框架f派生的。参数a的含义是什么?

1 个答案:

答案 0 :(得分:1)

这是一个图层,事物的名称与视图略有不同。看看CALayer,这些意思很快就会变得清晰。

p = position
b = bounds
a = anchorPoint

此外,如果您直接在LLVM中打印支持层,您将获得有关该层当前属性的更详细的描述:

(lldb) po 0x6080000c5550
<SCNBackingLayer:0x6080000c5550; position = CGPoint (0 0); bounds = CGRect (0 0; 480 360); delegate = <SCNView: 0x100e03070 | scene=(null) sceneTime=0.000000 frame={{0, 0}, {480, 360}} pointOfView=(null)>; sublayers = (<AVCaptureVideoPreviewLayer: 0x608000026420>, <SCNBackingLayer: 0x6100000c2450>); opaque = YES; masksToBounds = YES; backgroundFilters = (
); filters = (
); shadowColor = (null); anchorPoint = CGPoint (0 0); NS_view = <SCNView: 0x100e03070 | scene=(null) sceneTime=0.000000 frame={{0, 0}, {480, 360}} pointOfView=(null)>>

对于子孙后代,我还应该指出其他字母(AFOW等)是在_subtreeDescription输出的底部定义的。