Switching between locations programmatically
In this recipe, we will learn how to center the map on a specific location programmatically. We will move faster from now on. We will not focus on the iOS SDK anymore, and we will describe the steps related to general iOS development faster than the previous recipes. We will also dedicate our efforts to explaining more about the framework itself.
How to do it…
Follow these steps:
Open the
Chapter6-Recipe3-Begin
folder and then the.xcworkspace
file.Note
The project is already set up to be used with CocoaPods, but it doesn't include the dependencies required. Before opening the
.xcworkspace
file in Xcode, don't forget to run thepod install
command in the root of the project folder to download the dependencies.We will use this starter project to get through the recipe. In the storyboard, I added
UIToolBar
, twoUIButtonItem
controls, andUISegmentedControl
. All the controls are linked toViewController
. In theinfo.plist
file, I also added theNSLocationWhenInUseUsageDescription...