O'Reilly logo

Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming by Erica Sadun, Rod Strougo, Maurice Sharp

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

Improving the Storyboard: Take 2

iOS 6 introduced a better way to return data to the view controller that initiated the segue: You simply add a special type of IBAction to your view controller. Usually an action method has an argument that looks like (id)sender, or it has no argument at all. By changing the argument to (UIStoryboard*)segue, you create a special type of action, one that can accept segues.

As you saw earlier in this chapter, prepareForSegue:sender: is sent only when one scene initiates a transition to another. It is a forward segue. This other kind of action is the opposite: It is sent when a scene wants to go back to the previous one. It unwinds the segue that first opened the scene, and it opens the previous scene without creating ...

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