locationInView:
タッチの、指定したビューでの座標を取得します。
-(CGPoint)locationInView:(UIView *)view
解説
タッチの、指定したビューでの座標を取得します。
返り値
( CGPoint )
引数
( UIView * )view
フレームワーク
UIKit
クラス
UITouch
Instance Methods
使用可能
iPhone2.0
参照
例文
- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event { UITouch* touch = [touches anyObject]; CGPoint aPoint = [touch locationInView:self]; NSLog(@"x = %f , y = %f",aPoint.x,aPoint.y); [self touchesMoved:touches withEvent:event]; }