2011-08-04 2 views

答えて

14

CGPoint location = [gestureRecognizer locationInView:gestureRecognizer.view]; 

あなたがそれを必要とする場合は、別のビューを指定することもできます。

またはuはそれがむしろのViewControllerよりビューに属しており、このようなものになります もこれを使用することができます:

-(void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)evt { 
    UITouch *touch=[touches anyObject]; 
    CGPoint pt=[touch locationInView:self]; 
    // ...make your button at 'pt'... 
} 
+0

その作業を私はスクロール、ズームscrollviewならば、位置が – PJR

+0

uの権利ではありませんtouchesEndイベントを宣言しているか、またはGoogleの検索プログラムをGoogleで検索してください。 – ram

関連する問題