0
我在圖像視圖上顯示3個圖像。如何與另一個imageview交換一個imageview
我正在使用休耕代碼獲取圖像位置。
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
// get touch event
UITouch *touch = [[event allTouches] anyObject];
CGPoint touchLocation = [touch locationInView:self.view];
NSLog(@"%f %f",touchLocation.x,touchLocation.y);
這裏在控制檯我得到了圖像的位置。
現在我需要的是當過ImageView的拖過imageview2我需要在圖像視圖和ImageView的地點在imageview2的地方交換imageview2。
任何人都可以幫助我。
謝謝你提前。