Home / Apple / UIKit apprentice | raywenderlich.com

UIKit apprentice | raywenderlich.com

Before you begin

This section tells you a few things you need to know before you begin, such as what hardware and software you need, where to find the project files for this book, and more.


This section introduces you to the first of the four apps you will build during this book – Bullseye.

As you progress through building the Bull’s Eye app, the section will teach you how to think like a programmer and how to plan your programming tasks. In addition, you will also learn how to use Xcode, Interface Builder, and even the basics of coding for iOS.

While some of the concepts in this section may seem a bit basic, you can not skip this section if you are new to iOS development ̵

1; you will learn some basic things that serve as building blocks for what you learn later.

Welcome to UIKit Apprentice! In this book, you are about to dive into the latest and greatest best practices for Swift and iOS. You will build four iOS projects using Swift and UIKit. Good luck!

In this chapter you will start to build the home screen for the Bullseye game.

Congratulations, you have a UIButton on the screen! It’s time to start adding UISlider which will be fundamental to the game.

In this chapter you will deal with random numbers, start a new round in the game and calculate the points obtained.

It’s time to calculate and show the score and the number of rounds played in this chapter.

Add a little polish to the game so that it actually looks like a game. Also let the user restart the game so that two people can play the game.

Let’s refurbish the game interface with some fancy artwork and make the game stand out from the package. Let’s also add an About screen with information about the game.

Pooh! You’ve created Bull’s Eye. In the last chapter of this section you will learn about support for different device sizes and add some great animations.


This section builds on what you learned in the previous section by introducing you to your other app. Checklists takes you from an app with a screen to an app with multiple screens where you learn the concepts of navigation flow, show data lists and the idea of ​​modeling and maintaining your data.

If you want to build some kind of list-based iOS app, this section is a good starting point for learning the basics. Even if you are not building a list-based app, this section obviously has some basic concepts such as managing the navigation flow from one screen to another (and back again) that would be very useful for a teacher iOS developer.

Add a table view to view a list of tasks, and learn in the process how to encode navigation controllers and table views for iOS.

In this chapter, we will set up a data model that will represent our checklist elements, and then use the data model to show our tasks.

All about navigation controllers – how to add, configure and use them. Also learn how to add a new screenshot to your task app and how to add the ability to delete tasks.

Create the Add Item screen for your app and in the process, learn how to create custom table view cells, get user input, and add polish to the data entry screens.

You’ll learn about delegates and protocols, and how to use them to complete the add items features of your Checklists app.

Now that you can add items, you can learn how to edit added items. Also converts your code to optimize it.

Checklists work well, but we can not maintain our data – our tasks are reset every time the app is restarted. Let’s learn how to maintain our data between sessions.

From a list to many – Checklists currently manage a single list of items. It’s not very useful. Let’s add the ability to have multiple lists of items.

Let’s improve our data model so that we can have different tasks for each checklist. We will also implement a new storage strategy in the process.

Learn how to store application settings and other useful information between applications. Also how to protect yourself from possible crashes and improve the first experience of the app so that your app looks more polished and user-friendly.

With the basic functionality of your checklist app done, it’s time to add some polishing and functionality that makes your app stand out from the crowd.

Learn how to add local alerts to checklists so you can be notified when a task is due, and how to handle alerts throughout the life cycle of a task.

My places

With this third section and MyLocations app, you get into Swift programming in earnest.

Sure, you’ve already coded apps in the previous two sections, but this section starts with a good review of all the Swift coding principles you’ve learned so far, and adds to it by introducing some new concepts as well.

In addition, you learn about using GPS coordinates, viewing data on maps, and using the iOS photo selector to take photos with the camera or to pick existing photos from your photo album. There is a lot of valuable general information about Swift development, as well as specific information about building location-aware apps.

This section also introduces you to building dark mode apps – a topic you will take a deep dive into in the next section.

You have made great progress! You’ve learned the basics of Swift programming and created two applications from scratch. Now let’s add a little more Swift theory to strengthen the foundation we’ve built while creating these two apps.

This is the first chapter in this section that teaches you how to create a “location album” app. Take the first steps to create this new app by learning how to use the Core Location framework to get your location and view it.

You were able to access location data and view it in the previous chapter. In this chapter you will improve that code by dealing with GPS errors and improving GPS accuracy. You also configure the app to handle different screen sizes.

Time for a little more theory! You will learn all about objects, classes, heritage and some other object-oriented principles from Swift that you need to be familiar with.

Time to get back to coding again. Learn how to build the Tag Location screen and how to configure another data entry screen for an iOS app.

The MyLocations app functionality is slowly taking shape now. So it’s time to polish things up a bit by enhancing the user experience and adding some UI flourishes.

Learn all about storing your locations on your device using Core Data, the object’s endurance framework for iOS.

Let’s show the data you can now store via core data as a list of locations. Learn about TableView sections, NSFetchedResults and deleting selected locations.

Let’s get visual! Show your marked position on a map view using MapKit, so you can see where in the world each place is.

Learn how to use the built-in photo selector in iOS to add photos from your camera or photo album to the selected locations.

It’s time to give MyLocations a complete visual makeover! You change the style of the app, add buttons for action elements, add sounds, icons and launch images.

Great searches

The last part of the book covers the construction of an app that supports both light and dark looks from scratch via StoreSearch app. StoreSearch shows you how to have separate custom assets and colors for each type of iOS look.

But that’s not all! The app also shows you how to create custom screens for specific directions (landscape and portrait) as well as for specific platforms (iPhone vs. iPad). This section covers networks, works with remote API endpoints to retrieve data needed by your app, and how to analyze the retrieved data, how to work with Stack Views, and how to add iPad support to your app.

If that wasn’t enough, this section also takes you through the entire application lifecycle – from developing the code, testing it, and sending it to Apple. So do not skip this section and think that you know everything about iOS development after the last few paragraphs!

Most iOS job listings say you must have worked with a REST API. Well, this chapter starts you off with a new app that will teach you all about how to retrieve data from a remote server and get you on your way to REST API mastery.

Learn how to display your data in a table view using custom table cells. Also change the look of the app and troubleshoot a bit.

Learn in and out of creating network requests to remote servers. Once you get an answer to your query, you can learn how to analyze the JSON response.

Learn why synchronous networking is poor and how to improve things by switching to asynchronous networking.

Learn about the powerful networking features offered by URLSession to come up with interruptable network requests and how to download the imagery for search results.

Learn how to add a pop-up popup to view more information about selected search results.

The detail window works well, but it can do with a little more saliva and polishing to make it shine. Learn all about adding dynamic type support, gradient backgrounds and more animations.

You have only worked with a single direction until now. But your apps must support both portrait and landscape orientation. Learn how to add landscape support to StoreSearch and by adding a custom interface.

You have made great strides with StoreSearch, but now it’s time to rephrase the code to smooth out some of the rough edges. Knowing how to improve your code by reorganizing it is an important skill to learn.

StoreSearch works well when the display language is English. But what if you wanted to support other languages? Learn all about internationalization and how to update your app to support multiple languages.

Learn how to optimize StoreSearch for iPad and add iPad-specific UI features like shared view controllers and menu windows.

After all this work, your app is finally ready. You only have one dress to run – the App Store submission process. Learn about the Apple Developer program, beta testing via TestFlight, and how to submit your Apple approval app.

Source link