Posts

Showing posts with the label delegate

Treehouse Intermediate Course - Part 15 (Delegation 2)

So there just wasn't a chance yesterday to code! But I'm back today. I was thinking more about creating my own little programme to simulate F1 races and still love that. It could be extended to cricket - a ball by ball approach! But that's something for another time. For now, I'm going to complete this section on delegation; once the race horse example is done, THEN I'm going to play around with the code to see how the F1 sim could work! Cool. Start Time - 08:58 Implementing A Delegate So we need to get any object to adhere to a particular contract, to loosely communicate with race...sounds complex but we're going to find out more! Right so this is the example. This is the delegate - protocol HorseRaceDelegate {          func race( _ race: Race , didStartAt time: Date )     func addLapLeader(forLap lap: Int , atTime time: Date )     func race( _ race: Race , didEndAt time: Date , withWinner winner: Horse ) } De...

Angela Yu Xcode 12 Course - Part 15 (lectures 169 to 171)

Image
OK so last week was a bit of a bust! I started well with some progress at the start of the week but nothing for 8 days...not good! Anyway, I'm coding - unusually from Ras Al Khaimah - one of the other Emirates in UAE. Away with Cath for a several days and while she's reading, a good half hour of cracking on with Clima seems perfect! Before I start this properly, a good opportunity to assess things... It's been six weeks or so since I went back to Angela's course, well technically started her 'new' one, and I don't regret it one bit. I'm technically 31% through it all, which is a good number of hours. However, that isn't totally realistic as I did 'skim' through a number of the lessons. The main point I want to make here is that I DON'T feel the need to switch to another course or supplement my understanding through other resources or websites. Having been a committed Swift learner for 8 months now, I've realised and accepted that An...

Angela Yu Xcode 12 Course - Part 12 (lectures 144 to 156)

Here we are - another sizeable gap between entries! It's been longer than I hoped for but just difficult to find the time.  I hope that this changes, as since June I've been pretty consistent at maintaining my coding time. Anyway, I'm NEARLY at the point of where I was with Angela's Xcode 11 course. Definitely a good shout to recap and go over stuff with this one, especially as Swift has updated and I need refreshers anyway. OK here we go! Start Time - 12:19  Clima App So the Application Programme Interfaces (APIs) access online information - saving a LOT of coding time, plus with real-time updated information. Ok so one thing was putting everything to the desktop - that's where the reference to various files will be. So OK fair enough! Multiple view controllers - I've done this before so no biggy. Navigating between them - that will be useful for the next app! Segue - moving between view controllers. So Angela has set up all of the icons, views, con...