Implement swipe gesture.