我有 UIWebView 来显示文章。我有 UIWebView 用于显示 HTML 文章。当用户触摸 UIWebView 中的某个区域时,将显示 UIMenuController。然后用户选择注释按钮,它显示 UITextView。如何获取触摸位置?
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [touches anyObject];
// Get the specific point that was touched
CGPoint point = [touch locationInView:wbCont];
NSLog(@"X location: %f", point.x);
NSLog(@"Y Location: %f",point.y);
}
- (void)note:(id)sender {
}