concept pin in category ios

This is an excerpt from Manning's book Hello! iOS Development.
The map knows it has the pin, but it doesn’t know what you want the pin to look like yet. To find that out, it sends the controller a message if the pin is on the screen; you have to implement it to set what kind of annotation to use and what color it should be.
The final step is to implement the message to provide the viewing properties of any annotation. Viewing annotation properties is similar to viewing table elements, in that messages sent to request viewing properties are only generated for pins that are in view.
![]()
This message is sent for every annotation on the map, including the current location. First you need to check to see if the message is asking about your parking spot
. If it is, then you want to reuse old pins that you saved under the name spot
. If you haven’t saved a pin yet, then you make one
and set its color to green.
Listing 10.1. help.html
<html> <style>body {font: 10pt Helvetica }</style> <body> <h1>Parkinator Help</h1> <h2>Remembering where you parked</h2> <p>Parkinator lets you take a picture to remember where you parked. When you do, it also automatically gets the current location from your phone's GPS and places a pin on a map beneath the picture. To do this: <ol> <li>Tap the information button (the i) on the bottom right of the homescreen</li> <li>Tap the camera icon on the next screen</li> <li>Take a picture</li> <li>Tap the Done button</li> </ol></p> <h2>Tweeting that your spot is open</h2> <p>Tap the action button (2nd button from the left). Tweeting your spot will only work if you have entered a valid Twitter username and password into the iOS Twitter settings.</p> <h2>Viewing available spots</h2> <p>Tap the seach button (2nd button from the right). Free spaces near your location will appear as pins on the map.</p> </body> </html>