Added the viewWillAppear function for the right swipe and also the swipe function that gets called from the viewWillApear. Also changed the some minor errors