CALayer autoresizingMask not for iOS SDK?

Arsynth picture Arsynth · Dec 22, 2011 · Viewed 7.5k times · Source

I noticed, what CALayer, on iOS SDK haven't autoresizingMask property. I'm not sure what custom overloading of method "setFrame:" can work normally with animated sublayers autoresizing. Are there is an alternative without using UIView?

Answer

Mert picture Mert · Sep 4, 2013

If you do not want to subclass CALayer and added the layer to the layer of a UIView then you can override

- (void)layoutSublayersOfLayer:(CALayer *)layer

method of view.