Posts

*Xcode Project Entry* Letters in a Word Part 1

Image
So here is the first (well, technically not quite first - Yahtzee - entry for my own stand-alone project!). The idea with these is that I will work on something separate to whatever I'm learning about from Udemy/other course. The first one is actually a really good, potentially unique idea. To be honest, it's more something that is important to my girlfriend - Cath. Cath is ridiculously quick and accurate at working out the number of letters in words! Yes very specific! But if I can get it to work, it would be a neat Christmas present... Before going headfirst into the actual Xcode project, something I picked up from Ray Wenderlich was to make a note of EVERYTHING needed. So let's do that... On the view of the app Label to display random words A number pad to type in answer for how many letters are in the word A timer - from 5 seconds to 0 each time A scoring system for tracking Scoring system to link to timer (potentially!) The model (code) of the app An arra...

Bob Lee Course Part 15 (Consolidation of Chapter 2 - lectures 16 to 25)

So, a great chance to make sense of all of the concepts in Chapter 2. I will then crack on with Chapter 3 tomorrow! Chapter 2 was all about Object Oriented Swift. A lot of the terminology was familiar but I do feel on the most part (other than singleton stuff...) that my understanding improved with all of this. So let's go over it now! Start Time - 12:03 Convenience Init My Take - this is very simply another way to initialize an object. It's called convenience because the block of code for that init method has it all going on, then the initialisation process is very simple, or convenient. It could be as simple as using () after the class name. Yep, got it! Here's my example from before: class  Human {      var  name:  String      init (name:  String ) {          self . name  = name     }           convenience   init () {     ...

Bob Lee Course Part 14 (lectures 24 and 25)

Last part of Bob's chapter 2! After that I'm going to do a consolidation of the entire chapter, making sure that all of those concepts are clear in my head before continuing. Right no time to waste! Start Time - 11:38 Singleton Pattern Presumably not an explanation as why people don't have partners! No seriously, I have never heard of this so something else new to learn! So a singleton is an object that is instantiated once exactly. class AccountManager {          var userInfo = (ID: "Josh" , Password: 43432424 )          func network() {              } } AccountManager (). userInfo Not too sure about this but hopefully it will become clearer with the next bit. \ Use of 'private' - this means it cannot be accessed outside the block of code that it is created.  So in the above, we only want to create ONE object of AccountManager.    ...

Bob Lee Course Part 13 (lectures 21 to 23)

Image
Back to Bob! I have genuinely missed learning new information, having spent a few days doing my mega consolidation project! The will be updated at the end of each 'stage' or mini stage. So my aim now is to complete the rest of this chapter, then I will do a consolidation review of the entire chapter - object oriented Swift. OK, let's get stuck in! Start Time - 17:02 Override Method, Init, Property SO this is what we will be looking at - the super.viewDidLoad bit... I get the idea of the override method. If you have a function with a class, then in the subclass, you want to change how the method works. So you need to use the override keyword. Bob makes the point that if you use the original value of what is returned, then you need to use the super keyword... Xcode doing an update so am screenshotting rather than typing out actual code. All the above is fine - I had forgotten that I still need to use the super bit - even if the value is not...

Bob Lee Course Part 12 (consolidation of lectures 17-20)

Before I begin the much-needed consolidation blog, I feel the need to introduce something into my weekly repertoire. Each week, I am going to work on a specific Xcode project! the reason why is that Bob's course is totally separate to the main Xcode project stuff - it's all on playgrounds. That's fine as I am really learning the syntax but I am also losing touch with the practical element of getting code for a potential app together.  So this week I will focus on making a specific project. To start with, it will be a rework of something I have done before with Angela. I'm choosing her because her practical courses have been the most accessible and frankly the best. So after this consolidation entry, I will do an additional one to review what I have done since picking Swift back up in June - some 5 months ago. Also, for this entry, I'm adding in a ' MY TAKE' - so I can make it clearer what I know before revising any content. This is a good way of test...