To help display the current location, perform the following steps:
- Create a new Xcode project with the Single View Application template and with name the LocationServicesDemo.
- In the view controller in storyboard, embed the view controller in Navigation Controller. Then, drag a navigation item from Object Library.
- Add a UIBarButtonItem at the top right of the navigation item with the title Locate Me.
- Now, add a map view that will be responsible for displaying maps. Drag a MKMapView from Object Library and place it to fill the screen, like this:
- Now we need to ask for permission to access the user's location (if we don't ...