Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CALayer autoresizingMask not for iOS SDK?

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?

like image 463
Arsynth Avatar asked Dec 22 '11 07:12

Arsynth


2 Answers

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.

like image 80
Mert Avatar answered Oct 18 '22 02:10

Mert


You can use layoutSublayers function of calayer.

like image 21
adamgliea Avatar answered Oct 18 '22 03:10

adamgliea