Treehouse Intermediate Course - Part 17 (Build Interactive Story App Project 1)

So only around 20 minutes maximum today - just a brief entry. I didn't code yesterday as the time I'd spent on the F1 sim the day before had hurt my eyes and head too much! I'm heading back to Dubai today where I have my screen, so that will make it more doable! Anyway, time to start a new project! Let's go. 

Start Time - 08:41

Intro

I love the idea of these. As mentioned in the last blog, Angela had a fantastic one in her course before. The only issue with that was how 'messy' the code was for when the story would keep growing.

This will involve building reusable views, navigating to a new view, and going back to the beginning when done. Taking in text, delegates, complex models...will hopefully be useful!

Navigation Controllers

 Modal views.... But we are using stack views. We have a view on top of another and so on.

Navigation controller is provided by Xcode. Two jobs -

1. Present custom views from the view controller
2. Present its own custom views

There is a bar at the top of the screen - it will have a back button, label and any other options you want. You will have seen these on iOS all the time. Any views we want to present are added to the NC by means of their view controllers....

VC manages the views. NC tells the VC that we want to add/remove a VC from the stack. Starting to make more sense!

Root View Controllers

So main VC is the entry point. NC controls the ENTIRE app. We need the Root View Controller.

Embed in NC - I've seen this a few times before. This then shows the entry point is to the NC, then the arrow goes to the VC.

THE NC IS NOW THE ROOT CONTROLLER!

The NC does not contain a content view of its own. It manages a SET of VCs that display their own views.

So the root view is embedded in the NC. Going to do next two (shortish) videos then that's it for now!

Designing The Main Screen

Right pictures added from Pasan onto the assets folder.

So adding a picture after image view with constraints...all done. Link from Pasan about Image view stuff I will read up on next time -

https://developer.apple.com/design/human-interface-guidelines/ios/overview/themes/

Whizzing through this - a nice easy intro and set up!

Adding A Segue Show

We add a new VC, connect it to the button with 'show', then we have a stack view! There is an automatic 'back' button that appears to show this too.

Quiz then done for today.

Finish Time - 09:11 (30 minutes)

Well a useful intro and reminders of things on Xcode. Tomorrow I will delve deeper into the project.

Comments

Popular posts from this blog

*Xcode Project Entry 2* F1 Quiz - part 1

Angela Yu Course Part 10 (up to lesson 112)

Angela Yu Xcode 12 Course - Part 7 (lectures 74 to 79)