More Advanced Apps: Segues and Navigation Controllers

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.

App Development Workshop Follow Up

I hope you’re all enjoying the summer. It’s been sunny and warm in Ireland, thank goodness, so we’ve been spending our time outdoors as much as possible!

But we did get inside to do some coding when we recently ran a series of workshops to introduce new coders to the Develop in Swift series as part of an app development challenge.

If you’ve been reading Develop in Swift Explorations or Develop in Swift Fundamentals , I’ve recorded a video that takes some of the concepts and an approach to building an app and walks you through one way to do it.

I give you some pointers to lessons in Fundamentals or projects in Explorations that you might explore to learn more.

Check it out and we’ll be back soon with some more videos and coding tips!

EU Code Week 2020: That’s a Wrap!

It has been a wild and woolly ride, but you can now watch all TEN days of A Quick Start to Code with Swift follow-along sessions!

Steve and I recorded the last few extra days and posted them a little earlier.

Follow-Along Coding Sessions

If you’re just coming to the party, the sessions run around 40 minutes or so and are designed to fit into a classroom period.

We wrote up some instructions and tips for holding a code-along session in your own classroom. Or maybe you want to trial this on your own kids at home. Well, we have instructions for running these sessions at home, too!

Structure

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!

Recap

You can view the entire series of videos on their own here: https://www.thecodehub.ie/eu-code-week-2020/playlist.html

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?

The Ten

These are the ten sessions, for easy clicking:

A Quick Start to Code: Find Patterns

Steve and I are back with Earlston Primary School in Scotland to talk about finding patterns, from the Quick Start to Code with Swift PDF from Apple.

We talk a lot about finding patterns and turning those patterns we use repeatedly into functions. Find out more on our mini-site for our extended EU Code Week sessions.

What’s in a Function?

A function is a way to group a set of commands you’ve deemed useful enough that you want to re-use. So to write a function we need to think about what problem we’re trying to solve.

Your first pass may also not be your last! Often we’ll revisit code after solving a problem to see if we can improve on our original solution.

Unplugged

With Steve we work on turning left to turn right in the real world and we also play a game of “Dots.”

Come check out our session and get back to Swift Playgrounds with us!

https://www.thecodehub.ie/eu-code-week-2020/day2.html

EU Code Week: Going Further

So you’ve started your coding career, or maybe just progressed it a little. Now you’re looking for where else to go to learn coding.

Well, we have good news! We’ve taken a look at the other days in the Quick Start to Code with Swift PDF and are busy recording the next five days.

Five More Days!

You can check out newly beefed up mini-site for the focus of the new days.

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?

EU Code Week: Play Your Own Game Again

Join us live today at 9:45am, Irish/UK time for another follow-along coding session!

For context (and last week’s recording), you can visit our mini-site: Day Nine: Play your own game

We follow Apple’s Quick Start to Code with Swift PDF (and skip a few days, for now), which is why Friday is Day Nine.

Unplugged

Steve will teach us the rules of Rock, Paper, Scissors. This is important, because to turn this into a game we can code, we need to understand the rules, or the mechanics, of how the game works.

We’ll play a few spirited games, so make sure you’ve limbered up your fingers!

Coding

What better use of coding than to write your own game?

Well, today we’ll take the game Rock, Paper, Scissors, and turn it into our very own game. With code we’ll be able to customise the game, tweak it to our heart’s content.

So come join us, learn a little bit of coding, and start building your own game!

See you at 9:45am, Irish/UK time!

EU Code Week: Track the Gems Again

Join us live today at 9:45am, Irish/UK time for another follow-along coding session!

For context (and last week’s recording), you can visit our mini-site: Day Six: Track the gems

We follow Apple’s Quick Start to Code with Swift PDF (and skip a few days, for now), which is why Thursday is Day Six.

Unplugged

Okay, take a seat. Today we’re going to break down (not breakdance) our favourite dances. What is the name of the dance? What’s the duration?

Steve helps us to learn a little about variables when we consider what elements make up our real-world bouncing and bopping around.

Coding

We learn about variables today and have to dive into the Learn to Code 2 playground. This is a big step, and a HUGE new coding concept to learn.

We’ll use variables to keep track of the gems that Hopper collects as we solve the puzzles in today’s session.

See you at 9:45am, Irish/UK time!

EU Code Week: Get Loopy Again

Join us live today at 9:45am, Irish/UK time for another follow-along coding session!

For context (and last week’s recording), you can visit our mini-site: Day Four: Get loopy

We follow Apple’s Quick Start to Code with Swift PDF (and skip a few days, for now), which is why Wednesday is Day Four.

Unplugged

More dancing! If you’ve joined us for both weeks, your legs must be ready to fall off by now. But we go dancing on a loop today!

You will also likely have the song “Banana, Banana, Meatball” stuck in your head for the rest of the day.

Coding

We learn a critical coding skill today: how to get Swift to run our code again and again and again to solve problems. We’ll do this with a for loop.

Join us today and, with a little bit of forethought, we can solve problems even quicker than before!

See you at 9:45am, Irish/UK time!

EU Code Week: Get Groovy Again

Join us live today at 9:45am, Irish/UK time for another follow-along coding session!

For context (and last week’s recording), you can visit our mini-site: Day Three: Get groovy

We follow Apple’s Quick Start to Code with Swift PDF (and skip a few days, for now), which is why Tuesday is Day Three.

Unplugged

Steve will get you out of your seat and dancing today, so make sure you’ve stretched well and are wearing appropriate shoes today!

By following a set of moves, we’ll 1) look super cool and 2) be learning a little bit about coding.

Coding

We’ll be working from the Meetbot 2.0 Dances playground today, where we’ll learn a little bit about making our own commands today, called functions.

What moves do you want to group together to make our virtual Meet dance?

See you at 9:45am, Irish/UK time!

EU Code Week: Meet Byte Again

Join us live today at 9:45am, Irish/UK time for another follow-along coding session!

We’re back again this week for more coding fun. So if you missed our sessions last week or just want to join the live session this week, tune in!

For context (and last week’s recording), you can visit our mini-site: Day One: Meet Byte

Unplugged

Steve will get you to follow some instructions, just like commands, to build your own paper origami dancer in our unplugged segment.

Coding

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.

See you at 9:45am, Irish/UK time!