Implemented the iSwipeFunction