Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
现在我有两个手势,双击和单击。选择器是:
-(void)handleTap:(UITapGestureRecognizer *)tapRecognizer { CCLOG(@"Tap!"); }
我想知道如何获得水龙头的位置。
您可以使用识别器的locationInView:方法:
locationInView:
-(void)handleTap:(UITapGestureRecognizer *)tapRecognizer { CCLOG(@"Tap!"); CGPoint loc = [tapRecognizer locationInView:tapRecognizer.view]; }