add swipe sample code