just a small detail, not sure if it matters or not but anyway:
book says p684
“The MKAnnotation
protocol requires the class to implement three properties: coordinate
, title
, and subtitle
.”
yet the documentation says otherwise, only coordinate
is required:
“An object that adopts this protocol must implement the coordinate property. The other methods of this protocol are optional.”
additionally, on page 685, book says:
“That’s because the MKAnnotation protocol delcares all three properties as public. You have to match the protocol declaration exactly and so your properties must have the public attribute as well. If you don’t, Xcode will start whining :] Try removing the public attribute from one variable and see what happens …”
as of my Xcode version, the 3 properties are not declared as public in the protocol and therefore there is no need to declare them as public when conforming to the protocol
https://developer.apple.com/documentation/mapkit/mkannotation