Dot syntax learning


While doing the Bronze Challenge for chapter 5 I found some example Apple code:
mapView.mapType = MKMapTypeHybrid; //< in Apple code and this works. But given that I’m reading THIS book - I couldn’t leave it like THAT!

I knew that this was a property, but I had to pull out another book to recall the OTHER use for dot syntax. It would have been good if the iOS Programming book had something like what the The Dave Mark & Jeff LaMarche book lists: " = myVar; is equivalent to [someObject setFoo:myVar];

My code as I edited it:
[mapView setMapType:MKMapTypeHybrid]; // As Joe & Aaron would have wanted!

AND now I’m a TOTAL believer in never using dot syntax!
Great book so far!



Well, actually it has. Look at page 77 :wink:



Oh! look at that! I looked right at it too.