我正在尝试围绕右下角旋转图像。为此,我知道我需要设置图层的anchorPoint,但无法访问它。我在项目中包含了QuartzCore框架。为了尽可能简化问题,我将方法简化为以下三行,它们仍然抛出错误“错误:访问属性的未知'anchorPoint'组件”(第2行)。

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


这一定是真正愚蠢的。我看过其他示例,它们看起来相同。我想念什么?

最佳答案

你加了吗

#import <QuartzCore/QuartzCore.h>

10-08 07:45