My fight with Map kit iOS

Before you read along, a brief intro about me. I am a self taught swift developer for the past 1 year, before that I was a windows/web developer developing in Microsoft technologies. Also worked in couple of hybrid mobile apps using PhoneGap too. This is important because you need to read this post based on my point of view. A guy completely new to Mac World, didn’t even own a Mac until I started developing iPhone apps.

PhoneGap apps we created were mainly of 2 kinds, data listing and apps containing Maps. There were some hiccups while using PhoneGap and my company had to took radical decision to move to native apps. So I was assigned to take over iOS.

First we created a data listing app and it went out with a good success rate and we moved to our new big thing the app with Map.

  • The app needs an interactive map : Achieved
  • Should list more than 100 annotation pins on map : Achieved
  • Should have a pop up listing the details of the annotation pins
  • Should have a more detailed information of the annotation pins

I looked all over and was trying to find how to get it more attractive and intuitive. Took inspiration from Uber and other similar apps. All I could achieve was below and shipped also.

Too boring :(

That’s all I could achieve. What I wanted was much more.

Few weeks forward and I stumbled upon What’s New in MapKit WWDC 2015. It mentioned detailCalloutAccessoryView. Which helped me achieve what I wanted.

You can see the result below

Much Better

You guessed it right its a UITableView in the Annotation popup

This was good enough but I needed that extra mile.

I wanted to customize the top Title in the popup to give bit more inter-activeness

I searched the web and landed on a SO post. From this I found a way to customize the font, in the Title. I used the same trick to place a new view there and shazzam…

And the star of the day

Well not the most aesthetic use of colors, but you get the point.

Check out my Git Hub Project if you want to know the code.

Note: this is not a actual project just a showcase how to customize Annotation View

On a final note, when I started iOS development all I could see a set of standards and controls I could not customize. But as you progress you can see iOS Map Kit is as much as editable as it can be. Similarly all the controls. Crossing the barrier may take some time, but eventually you will get there.

I am available at twitter and facebook.