2012-12-04 22 views

回答

0

考慮到您的情況,我建議您使用UITapGestureRecognizer。 首先在init上設置TapGestureRecognizer。

UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapRecognizer:)]; 
[scrollView addGestureRecognizer:tap]; 

然後從下面得到亮點:

- (void)tapRecognizer:(UITapGestureRecognizer *)gesture 
    { 
    CGPoint touchPoint=[gesture locationInView:scrollView]; 
    } 
相關問題