Recipe: Segues

When you use storyboards, IB provides a set of standard segues to transition between your view controllers. With custom containers come their little brother, custom segues. Just as tab and navigation controllers provide a distinct way of transitioning between child view controllers, you can build custom segues that define transition animations unique to your class.

IB doesn’t provide a lot of support for custom containers with custom segues, so it’s best to develop your segue presentations in code for now. Here’s how you might implement code to move a view controller to a new view:

// Informal custom delegate method - (void)segueDidComplete {     // Retrieve the two vc's     UIViewController *source ...

Get The Core iOS Developer’s Cookbook, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.