2014年3月3日月曜日

タッチ位置と画像の位置を合わせる

 UITapGestureRecognizer* pan = (UITapGestureRecognizer*) sender;
    CGPoint location = [pan locationInView:self.view];
    NSLog(@"pan x=%f, y=%f", location.x, location.y);
    started =true;
    areaValue = [[AreaValue alloc] init];
    areaValue->x = location.x/self.view.frame.size.width*480;

    areaValue->y = location.y/self.view.frame.size.height*640;

0 件のコメント:

コメントを投稿