Dot syntax learning


#1

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: "someObject.foo = 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!


#2

Hi DXZDB1

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

Greetings
Joerg


#3

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