Posts

Showing posts with the label nested function

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