UIImageView CALayer anchorPoint Error accessing an unknown component of a property

I am trying to rotate the image in the lower right. For this, I know that I need to set the anchorPoint layer, but I cannot access it. I have included the QuartzCore framework in my project. To simplify the task as much as possible, I reduced the method to these three lines, which still throw an error: error: access to the unknown anchorPoint binding component of the property (line 2).

UIView *sqView = [[UIView alloc] init];
sqView.layer.anchorPoint = CGPointMake(1.0, 1.0);
[sqView release];

It must be something really stupid. I looked at other examples of this, and they seem to be the same. What am I missing?

+3
source share
1 answer

You added

#import <QuartzCore/QuartzCore.h>
+16

Source: https://habr.com/ru/post/1727329/


All Articles