Posts

Showing posts with the label view controller

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 custo...

Angela Yu Xcode 12 Course - Part 21 (lectures 193 to 197)

Image
Yes, so I have found some sort of rhythm, hence another entry today! Just continue from where we got to.... *Ended up continuing from 4th April instead! Start Time - 17:09 Swift Closures (advanced Swift!) My understanding of these is that they are like functions without a specific name. So they can be shorter/easier etc. I tried conceptualising them before with Bob's course but it was at that point that I gave up on them! Function - bread analogy. An input with a machine that cuts up the bread, then an output (sliced bread!). Three variations on functions - 1.Those that do something without any input/parameters or have an output 2. Those that take an input with no specific output 3. Those that take an input and give an output So closures are a step beyond that! Simple function - with input, output and something that happens. Then an adding one, which we're going to use into the original function... Here's how it now looks -   Ahh so I can pa...

Angela Yu Xcode 12 Course - Part 15 (lectures 167 to 168)

Image
As I mentioned enough times already, this is a tough chapter! Before, when I attempted it (when was that, October/November?) I actually bailed on it. I felt the need to go over the fundamental coding concepts again and that the Clima project was too 'out there'. However, I'm looking at it differently now - it's a great opportunity to see something completely different! And there are some good bits along the way! Start Time - 17:55 Delegates and Protocols I've seen these before - it's about modelling behaviour and about getting something else to do a job essentially! In the context of Clima, the CLLocationManager is the delegate to do the job of looking for the location (for the location manager). Right so seeing it another way - a protocol is a contract! We have drawn up a contract - if it wants to be the delegate, then it needs to be able to handle what is in the protocol created - protocol ChangeCityDelegate {     func userEnteredACityName(cit...