我的动画效果是把一个UIView对象绕着一个点旋转,但是旋转完之后就不能响应触摸事件了,怎么点都没反应。
我发现点击View原来的位置时能响应,是不是有一个负责响应触摸的层没有移过去?求助!
我的代码是这样的:
- (id)initWithFrame:(CGRect)frame
{
self = ;
if (self)
{
self.image = ;
self.userInteractionEnabled = YES;
;
//旋转45度
CABasicAnimation *ani = ;
ani.delegate = self;
;
UITapGestureRecognizer *tap = initWithTarget:self action:@selector(clickToCharge:)];
;
;
// Initialization code
}
return self;
}