figuring out the size of a constrained layer?

Hi,


I am laying out a sublayer of a layer that is constrained to it's parent layer.

That's a mouthful, I know.

anyway, when I test the Size of a layer that is constrained, I get the size, pre-constraint. for instance:


let's say we have 3 layers: layerA, layerB, and layerC. these layers are in a hierarchy :

layerA

layerB

layerC

layerA, is a View backing layer (ie: it is the layer associated with a view)


layerA is automatically sized with the view (which is resized from time to time,) and it has a LayerConstraintManager set.

layerB has constraints that keep it's size just shy of the the size of layerA.

layerC is a custom layer, and we are overriding layerB's layoutSublayers method in order to control layerC.


in the layoutSublayer method, when we test the bounds of layerB, we always get the same size, and it corresponds to the size of the layer before constraints are applied.


how can I find the size of the layer Post constraint? That is, how can I determine the size of the layer that is constrained... right now?

Accepted Reply

operator error.

some intermediate code was doing something unexpected.

Replies

operator error.

some intermediate code was doing something unexpected.