Book Image

iOS 10 Programming for Beginners

By : Craig Clayton
Book Image

iOS 10 Programming for Beginners

By: Craig Clayton

Overview of this book

You want to build iOS applications for iPhone and iPad—but where do you start? Forget sifting through tutorials and blog posts, this is a direct route into iOS development, taking you through the basics and showing you how to put the principles into practice. With every update, iOS has become more and more developer-friendly, so take advantage of it and begin building applications that might just take the App Store by storm! Whether you’re an experienced programmer or a complete novice, this book guides you through every facet of iOS development. From Xcode and Swift—the building blocks of modern Apple development—and Playgrounds for beginners, one of the most popular features of the iOS development experience, you’ll quickly gain a solid foundation to begin venturing deeper into your development journey. For the experienced programmer, jump right in and learn the latest iOS 10 features. You’ll also learn the core elements of iOS design, from tables to tab bars, as well as more advanced topics such as gestures and animations that can give your app the edge. Find out how to manage databases, as well as integrating standard elements such as photos, GPS into your app. With further guidance on beta testing with TestFlight, you’ll quickly learn everything you need to get your project on the App Store!
Table of Contents (26 chapters)
iOS 10 Programming for Beginners
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
Free Chapter
1
Getting Familiar with Xcode
Index

Chapter 11. Where's My Data?

When building iOS apps, data can be the most important part. Typically, the apps you build require getting data from an online data source, known as an Application Programming Interface (API). In the previous chapters, we have only worked with a plist to supply our data. The plist bridges the gap to understanding how to work with an API, as you will see shortly. In this chapter, we will work with an API that is in JavaScript Object Notation (JSON) format. This format is common no matter which backend service was used to create the JSON. In this chapter, we will cover:

  • What a JSON file is and the different components of this data feed

  • Passing data using segues

  • What extensions are and how to use them to clean up your code

For our app, we need one class to handle our data, but we need to share it between both our Explore View Controller and Map View Controller. Let's first understand the responsibility of our API Manager.