Adding a completion block for when an animation finishes in the segmentController