Book Image

Swift Cookbook

By : Cecil Costa, Cecil Costa
Book Image

Swift Cookbook

By: Cecil Costa, Cecil Costa

Overview of this book

Table of Contents (18 chapters)
Swift Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Leaving breadcrumbs


Have you ever gone somewhere and started thinking whether your path was the best one? At times, we would like to review our journey once we've reached the destination. Usually, we do this when the journey has been a very long one. In this recipe, we will create an app for recording our steps and then we can check the path we took.

Getting ready

Create a new single view application called Chapter 11 Breadcrumbs, add the Core Location Framework and the MapKit Framework. You can use the simulator or a physical device to test this app; however, if you are as lazy as me, it will be better using the simulator; this way, you don't have to stand up and walk to test it.

How to do it...

Once you have added the frameworks, you just need to follow these steps to create the app.

  1. Open the storyboard; add a label on the top, a button under it, and a map view under it, something for which the result can be similar to the following screenshot:

  2. As usual, start connecting the label and the map...