We’re in the thick of a hackathon project and some students are plowing ahead with their prototypes and looking to turn them into full-blown apps.
In this new video I walk you through a pretty common scenario.
Many of our apps are going to have more than one screen. And what appears on subsequent screens is going to depend on what a person has tapped on or possibly something they’ve typed in or a way they’ve interacted with a previous screen.
So we need a way to pass data from one screen to the next. This topic is covered in Develop in Swift Fundamentals in Lesson 3.6, Segues and Navigation Controllers.
Our segue will be our go-between our original, or our source, view and our destination view. And there’s a little bit of sort of magic* involved.
Check out the video below for some steps through creating another View Controller that will be our destination view, the code that backs it, a connection to the new view, and how to wire up passing data between the two.
Best of luck building out your more complex app!
* Well, not quite “magic.” More like hooks into the very inner life of our iOS app like we’ve got a pair of X-ray specs and suddenly we can see all this cool underpinning of our apps going on that maybe we didn’t realize was there before.
The extra sessions follow the same formula as the first five. We start off with a brief intro to the day’s topic. Then we show you a very cool ‘unplugged’ activity where we exercise the concepts for that day’s lesson. Once we’ve gotten everyone up out of their seats and moving, we gather back around the iPads and Swift Playgrounds for some coding.
On some days we had special guests, which always added an extra bit of excitement to the sessions, and I can’t thank the schools from Scotland, Sweden, Norway, the Netherlands, and Ireland enough for joining us!
And you can always prepare for each class by referring to our handy site, which contains added context, descriptions of what you need for the unplugged portion, and things you can do to challenge students who are blazing ahead.
I really had a blast coding along with you for ten days. Hopefully this has ignited a little spark for you. Coding is just another way of expressing ourselves, and we found an number of ways of doing that in these ten days. If you keep going, keep practicing, you’ll find all sorts of new ways to solve problems. And then who knows where it can take you?
We’ll be adding more details, especially around the unplugged segments, as the next few days go by. In the meantime, you can try your hand at the code for each day, as we have sample code, ideas for extending the material if you or your class is flying ahead, or you can learn more about the ideas behind the lesson.
When we’ve recorded the session we’ll post the video on the corresponding page so you can use it in class, just like our other days.
Going Even Further
But what if you’ve done all the extended ideas for the coding, all the unplugged sessions. You’re danced out and your brain is electrified with possibilities of coding!
Well, we have a Going Further page on the mini-site that will give you places to go, material to explore. From more Swift Playgrounds to other realms of coding, like Augmented Reality, to Xcode and building apps for iPhones and iPads and Macs, on Macs.
You’ve taken the first, very exciting steps in your coding career: where are you going to take it from here?
Steve will get you to follow some instructions, just like commands, to build your own paper origami dancer in our unplugged segment.
We’ve got a few more tricks up our sleeves for this week to help you code along with us, so if you felt overwhelmed last week or just want to practice, come back and we’ll work on the building blocks of coding today: commands.