xCode Workshop 5 Extension – Adding Logo’s

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.

Screen Shot 2015-02-21 at 12.33.30

Next to update was the ‘View.Controller’ for the ‘Coffee Shop’ variable by adding the image path to each instance.

Screen Shot 2015-02-21 at 12.36.38

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’:

Screen Shot 2015-02-21 at 12.38.55 Screen Shot 2015-02-21 at 12.40.25 Screen Shot 2015-02-21 at 12.40.46


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s