【发布时间】:2012-02-20 10:09:43
【问题描述】:
我提到了名为“Comic Strip”和“Balloon Stickies Free”的应用
当我添加一个语音气球并触摸 s.b 或 s.b 的尾巴时,它会起作用。但是当我在 s.b 和 s.b 的尾巴周围或之间触摸尾巴时,它不起作用。并且 Photo 得到接触并在 s.b. 下工作
所以我尝试使用hitTest:withEvent.
当我第一次触摸矩形或 tailRect 时它可以工作。但是当我触摸对象中的其他地方时,我再次触摸矩形或tailRect,它就不起作用了。
那么如何修改这段代码呢?我不知道..请帮帮我
- (id)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
UIView *hitView = [super hitTest:point withEvent:event];
if(CGRectContainsPoint(rectangle, currentPt)==YES || CGRectContainsPoint(tailRect, currentPt)==YES)
return hitView;
else
return nil;
}
【问题讨论】: