2012-04-18 8 views

答えて

0

あなたはコードの下touchesBeganイベントを試すことができます。

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { 
    if([touch view] ==self.my_view)//Check click your uiview or not 
    { 
     CGRect frame = [your_image_view frame]; 
     CGPoint touchLocation = [touch locationInView:touch.view]; 
     frame.origin.x=touchLocation.x; 
     frame.origin.y=touchLocation.y; 
     [your_image_view setFrame:frame]; 
     [self.my_view addSubview:your_image_view]; 
    } 

} 

感謝を...!

+0

私は知って、感謝! – user49336

0

最初の手順は、高レベルのAPI UIGestureRecognizerを使用してビューに追加することをお勧めするためにUIViewのタッチを検出することです。その後、コールバックを使用して、必要なものを、おそらくアニメーションの何かをすることができますか?そうであれば、アニメーションブロックを使って変更をアニメートすることができます。

+0

アドバイスありがとうございます! – user49336

関連する問題