change Animated:YES to Animated:NO

Changed dismissViewControllerAnimated:YES to dismissViewControllerAnimated:NO