Is this kind of notation legal in Objective - C
CLLocationCoordinate2D coord = {latitude: 61.2180556, longitude: -149.9002778};
MKCoordinateSpan span = {latitudeDelta: 0.2, longitudeDelta: 0.2};
MKCoordinateRegion region = {coord, span};
What is this? Curly brackets?
Also shouldn't that be CLLoca开发者_如何转开发tionCoordinate2D * coord
I saw them on http://www.iphonedevsdk.com/forum/tutorial-discussion/39374-mkmapview-tutorial-using-latitude-longitude.html
Totally strange.
This is C99 “designated initializer” syntax for initializing structs. (It has nothing to do with the Objective-C concept of “designated initializers” for classes.)
精彩评论