Segues
π― Learning Goals
- Understand why segues are a building block for iOS development
- Build segues between views
- Practice reading a blog post to learn a new skill
π Technical Vocabulary
- Segues
- View Controllers
How Many Views in an App?
π£ Check It Out: Different Views
With your breakout group, pick a driver and a note-taker. The driver will tap around as much as possible on an iOS app. The note-taker will tally every time the app showed a completely different view. You will have exactly one minute.
Reflect
How many different views did you encounter? What was the transition like between views? What would your experience as a user be like if the whole app was on one single view?
π Segues
Those transitions - from view to view - are called segues. We also want to be able to show the user a different view when they click a button. For a good user experience, that segue should provide a smooth animation so itβs easy on the eyes, and feels natural.
Learn From Other Developers
You will shortly read through a blog post to learn how to implement segues. On the first read through, please only read and take notes. The reason for this is: sometimes the title of a blog wonβt give the most accurate information, and halfway through reading it, a software developer realizes itβs not the thing they were looking for. The first read allows you to make sure this is the right thing, and that we have the tools/knowledge to start at this point (sometimes we need to learn some of the stepping stones first). Please do this independently!
Blog: All you need to know about using Segues!
π£ Discuss: First Read Debrief
From your first read through the blog:
- Any words/terms you don't understand?
- Do you feel like you have the tools to follow along in Xcode next time you read it?
- In your own words, what is a segue?
- List the basic steps (don't need details) of how to create a segue.
Now that we know this blog gives us the info we want and is on our level, we can go through the tutorial to practice! Open up a new Xcode project and follow along!
π Class Discussion: Second Read Debrief
From your first read through the blog:
- What challenges came up in completing this?
- Did reading it one time through first seem to help? Why or why not?
This is what software developers do every day! And you just did it! Being pushed out of your comfort zone is essential in learning, so if it felt challenging at times, that is ok and actually good!