最初に、スワイプジェスチャ認識機能をライブラリからビューにドラッグアンドドロップします。

そして、ビューでキャンセルされたアイテムをチェックします。

スワイプジェスチャに応答するコードを記述します。
- (IBAction)swipe:(id)sender {
v.backgroundColor = [UIColor blueColor];
}
次に、タッチデリゲートメソッドを記述します。
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch* touch = [touches anyObject];
CGPoint pt = [touch locationInView:self];
layer.frame = CGRectMake(pt.x, pt.y, 100, 100);
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch* touch = [touches anyObject];
CGPoint pt = [touch locationInView:self];
layer.frame = CGRectMake(pt.x, pt.y, 100, 100);
}
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
{
layer.frame = CGRectMake(0, 0, 100, 100);
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
self.backgroundColor = [UIColor redColor];
}
これで、キャンセルせずに画像を移動でき、画面をスワイプして青色に設定できます(スワイプジェスチャは正常に認識されます)。両方できます。そして、タッチが終了すると、ウィンドウの色が赤に変わります。

このサンプルプロジェクトをダウンロードして実行するだけです。
https://github.com/weed/p120812_TouchAndGesture