初学者问题:我创建了一个新类,它是 UIImageView 的子类。为什么当我试图创建一个方法时我不能使用任何 UIView 属性?
-(id)initWithImage:(UIImage *)image
{
self = [super initWithImage:image];
if (self) {
UIRotationGestureRecognizer *rotationGestureRecognizer= [[UIRotationGestureRecognizer alloc]initWithTarget:self action:<#(SEL)#>];
[self addGestureRecognizer:rotationGestureRecognizer];
}
return self;
}
-(void) handleRotations: (UIRotationGestureRecognizer *) paramSender
{
self.transform
}
班级无法识别 self.transform 为什么会这样?