Book Image

Mastering iOS 12 Programming - Third Edition

By : Wals
Book Image

Mastering iOS 12 Programming - Third Edition

By: Wals

Overview of this book

The iOS development environment has significantly matured, and with Apple users spending more money in the App Store, there are plenty of development opportunities for professional iOS developers. However, the journey to mastering iOS development and the new features of iOS 12 is not straightforward. This book will help you make that transition smoothly and easily. With the help of Swift 4.2, you’ll not only learn how to program for iOS 12, but also how to write efficient, readable, and maintainable Swift code that maintains industry best practices. Mastering iOS 12 Programming will help you build real-world applications and reflect the real-world development flow. You will also find a mix of thorough background information and practical examples, teaching you how to start implementing your newly gained knowledge. By the end of this book, you will have got to grips with building iOS applications that harness advanced techniques and make best use of the latest and greatest features available in iOS 12.
Table of Contents (29 chapters)

UITableView Touch-up

There's a good chance that you have built a simple app before, or maybe you have tried but didn't quite succeed. If this is the case, it is likely that you have used UITableView or UITableViewControllerUITableView is a core component of many iOS applications. If an app shows a list of things, it was likely built using UITableViewBecause UITableView is such an essential component on iOS, I want to make sure that we cover it right away in this book. It doesn't matter whether you have looked at UITableView before. This chapter will ensure that you are up to speed with the ins and outs of UITableView and understand how Apple has made sure that every table view scrolls with a smooth speed of 60 frames per second, which we all strive for when developing apps.

In addition to covering the basics of UITableView, such as how it uses delegation to obtain information about the contents it should display, you'll also learn the basics about accessing a user's data, in this case, their contacts. The application that you will end up building displays a list of the user's contacts in a table view.

Every UITableView uses cells to render each item it displays. In this chapter, you will create your own UITableViewCell that uses Auto Layout. Auto Layout is a layout technique that is used throughout this book due to its essential part of every iOS developer's toolkit. If you haven't used Auto Layout before, or if you haven't heard of it, that's OK. This chapter starts with the basics, and your knowledge will expand as you go through this book.

In summary, this chapter covers:

  • Configuring and displaying UITableView
  • Fetching a user's contacts through Contacts.framework
  • The delegate and data source of UITableView
  • Creating a custom UITableViewCell
  • UITableView performance characteristics