You want to introduce and use a new type of storyboard transition in your storyboard files so that the move from one view controller to another is done in a custom way—for instance, with a custom animation.
perform method to do
Storyboards, by default, offer a few useful segue types, such as push and modal. These are great, but sometimes you may wish to perform a custom transition from one view to the other. In these cases, it’s best to use a custom segue object. Let’s create a segue, then. What we are going to do here is allow the first view controller to display the second view controller with a flip transition. To do this, follow these steps:
Create a project based on the Single View Application template in Xcode.
In your storyboard file, create a second view controller and place a button in the center of the first view controller. Hold down the Ctrl button on your keyboard and drag and drop from the button onto the second view controller. At this point, a dialog will appear on your screen asking what type of transition you want to associate with this segue. In that dialog, choose “custom” (see Figure 6-14).
Figure 6-14. Associating a custom segue with the action of our button
Now select your segue, and in the Attributes Inspector in Interface Builder, ...