Posts

Showing posts with the label Bob Lee

Bob Lee Course Part 18 (lectures 30 to 32)

Image
So a few things happening when working on, and successfully completing my first own app. I got obsessed, obsessed with getting it right - making it usable, a clear view and the hours ticked away. This was definitely a great way to learn! To branch out and take the risk of trying something that could have easily failed was no easy feat. Since the last entry, I've tweaked the view for a final time and worked out how to create my own app icons. It is not just a cliche saying it, but learning through direct practice and experience has really worked! Now I'm thinking about what 'simple' apps I could make next. It's very tempting to; various ideas have started entering my head since and during 'How Many Letters'. But I need a balance. I need to continue with Bob's course and try to understand Swift on a higher level as otherwise, my code will always be a bit limited and more verbose than it should be. My goal is to complete closures today, then decide if I w...

Bob Lee Course Part 17 (Lecture 29)

Image
Unusual time to be doing an entry? Yes, absolutely! I have laryngitis - so I basically have to be off work, both yesterday and today.  A blessing? Probably! Well, the upshot is that I get to do some coding today, a rare treat. It's been difficult finding any time recently due to going to the F1 in Abu Dhabi, work and laryngitis! So, let's pick that up with Bob's course. Last time it was an introduction to closures. It was hard! From what I remember, closures are another way of writing functions. They can actually be simpler - VERY simple if you use the $ syntax for accessing the values. Still, the whole thing was tricky. Let's continue with the aim of finishing Chapter 3 today! Start Time - 11:27 Lazy Init with Closures My take - I know a bit about lazy already. I know that this means the value does not take up any space until it is used. So it is good for memory management. So that is the code for creating a UIButton. Bob's point here is that to create ...

Bob Lee Course Part 16 (lectures 26 to 28)

Image
Back to Bob! Now, I have genuinely been ill for the last few days - headaches, sore throat, cold...flu but really overwhelming. Not so bad to be off work but pretty horrible. Anyway, I have some time at last! I forgot to post the first (proper) Xcode project, so that's now several days out of sync. Not to worry. I will add to that later if I can! Now, the plan is to continue with Bob's Intermediate course, with the possibility of switching to Sandra's after chapter 3. Realistically, that's 2 main entries of the content with one consolidation one. Let's see how it goes! Start Time - 17:15 CHAPTER 3! Bob makes the point that people usually struggle with closures. Good - because I always have! Introduction to Closures (1) So the key point with closures is that they are essentially functions without using the 'func' keyword. You can also create a variable and assign it to a function, then it has the same functionality. Cool! var addClosure: ( Int...

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 () {     ...