O'Reilly logo

iOS 8 SDK Development, 2nd Edition by Janie Clayton, Chris Adamson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the Storyboard Segue

When we tap a cell in the list of tweets, we navigate to the new view controller, which we’ll customize to show the details for the selected tweet. But hold on, how do we know which tweet was selected? And how will we communicate that to the other view controller?

This is where the segue can help us. Prior to performing a transition between view controllers, the current view controller gets a callback on the method prepareForSegue, passing in details of the transition in a UIStoryboardSegue object. As inherited from UIViewController, this method does nothing, but we can override it to take some interesting action, based both on our current state and details of the segue.

The UIStoryboardSegue object provides properties ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required