Implemented the iSwipeScreen function