As an extension to the ‘Coffee Shops’ application created in yesterday’s workshop, I wanted to be able to customise the callout by adding a logo or photograph to the comment.
The first stage was to add each image into the project by simply dragging them from the file location. Then, a new property was added to the ‘Coffee Shop’ class to hold the path of the image. I also updated the instances to hold the new information that I wanted to add.
Next to update was the ‘View.Controller’ for the ‘Coffee Shop’ variable by adding the image path to each instance.
Below is what the opened ‘pin’ looked like at the end displaying the logo or a photograph for the coffee shop alongside the ‘name’ and ‘comment’: