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

Why Not Segue Back?

Your first thought for telling the add/view scene to update may be to segue back. Unfortunately, this does not work. Each segue creates a new view controller. Instead of going back to the same add/view view controller instance that opened the edit scene, you would go to an entirely new view controller with just one car. Even worse, the original edit scene would not be disposed of, and each edit/return cycle would create two more controllers that take up memory.

You can update the add/view scene in at least three ways:

Image Add a currentCarUpdated method to ViewController and a link to the ViewController object in CarEditViewController ...

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