Annotation Pin in iPhone or iPad
In this article I will explain process of implementing map and show location using notation pin in iPhone or iPad.
In this article I will create a Single View application. Here I use a map view from xib and write a code for implementing an annotation pin. Using this we can determine the location of the device.
To understand it we use the following procedure.
Open XCode by double-clicking on it.
Create a New XCode Project by clicking on it.
Now Select Single View Application and click on Next.
Now provide your Product Name and Company Identifier.
Select the location where you want to save your project and click on Create.
First we add the framework MkMapkit which is required to show the location.
To import this framework we use the following.
Click on project and select Build Phase.
Click on the "+" icon to add a framework.
Write on search bar mapkit and click on add button.
Now we write code and add a mapview from xib.
Click on the run button to show output.
Output in iPhone:
Output in iPad: