Posts

Showing posts with the label delegates

Angela Yu Xcode 12 Course - Part 15 (lectures 167 to 168)

Image
As I mentioned enough times already, this is a tough chapter! Before, when I attempted it (when was that, October/November?) I actually bailed on it. I felt the need to go over the fundamental coding concepts again and that the Clima project was too 'out there'. However, I'm looking at it differently now - it's a great opportunity to see something completely different! And there are some good bits along the way! Start Time - 17:55 Delegates and Protocols I've seen these before - it's about modelling behaviour and about getting something else to do a job essentially! In the context of Clima, the CLLocationManager is the delegate to do the job of looking for the location (for the location manager). Right so seeing it another way - a protocol is a contract! We have drawn up a contract - if it wants to be the delegate, then it needs to be able to handle what is in the protocol created - protocol ChangeCityDelegate {     func userEnteredACityName(cit...