Posts

Showing posts with the label Angela Yu

Treehouse Intermediate Course - Part 16 (Delegation 3)

Image
Here we are now! So, first of all, I've spent several hours tinkering with the F1 Sim Playground and made some major breakthroughs! Yesterday, I realised that the main issue was that the random value was being added to ALL the drivers' distanceTravelled. This basically negated the whole point of the random element. Essentially, the maxSpeed would determine the whole race! So I came up with a solution...eventually! And I am so proud of it! I can now run a sim for a general race for as many drivers as I want, all with their own maxSpeed set, and the results are randomised, but based mostly on what their maxSpeed is. Cool! Unfortunately, today, I have been battling with trying to run the overall results. I tried it as a for loop, as a closure...a function...and I've had to give up! Always frustrating...actually kind of heart-breaking but that's where resilience needs to come in. So easy to feel disappointed but this is where I need to get more ruthless. I don't have ...

Angela Yu Xcode 12 Course - Part 23 (lectures 202 to 209)

Image
Here we go! Having failed miserably of getting much coding done at home, I'm back with a vengeance! Seriously though, I should NOT feel guilty. It's all about when I can actually have the time; it will come and go in phases. When I get to the 'One year' point (around June) then I can review what I have achieved and where I want to go with this. For now, the aim today is to get the Firebase course totally done. Let's go! Start Time - 13:15 UI Animations This sounds interesting - I'd assumed it was possible to do your own but having never SEEN it, I wasn't so sure! So Angela is showing the movement of a circle from left to right. All sorts of options for duration etc. So in this section This is wear we want animation coming up. The text field will move up so it's not obscured by the keyboard. Challenge - added the UITextFieldDelegate protocol no problems. I've done this before with a text bar! It means we're setting up this cha...

Angela Yu Xcode 12 Course - Part 22 (lectures 198 to 201)

Image
Yes, this time I AM managing two entries in a day! My aim is to complete the rest of this flash chat/Firebase course. It's doable. Let's do it! Start Time - 13:06 Logging In Before I start the video, just a note about the current project. There is a separate view controller for each screen - each separate one from the main storyboard. Something I've missed before is the links between these including segues. For the challenge I've used the same code as before -       Auth . auth (). signIn (withEmail: emailTextfield . text !, link: passwordTextfield . text !) { (user, error) in             if error != nil {                 print (error!)                              } else {                 print ( "Login success!" )              ...

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 20 (lectures 190 to 192)

Image
Another big gap between entries! Never mind. It's the 'Spring Break' (sounds very American, eh!) so a bit more time hopefully. Going to pick up where I left off with Firebase. The layout and setup was a bit different to what Angela had so need to bear that in time.  Let's go! Start Time - 12:48 Xcode installing a few updates. Let's just recap where we got to. I currently have this screen while I boot up Xcode. Last time this was running indefinitely and I had to leave it. I had a new Xcode file - the xcworkspace one and got all of the pod install sorted. If the above message is still there when Xcode is updated (hopefully soon!) then I will just crack on regardless. A good chance to look ahead at the lectures in this particular project: OK here is a run through - 191 - saving data to Firebase 192 - Registering users 193 - closures (YES, I need to understand these better!) 194 - event driven nature of apps 195 - completion handlers 196- navigation c...