Quick Guide to iOS App Development - Novice to Pro!: 4-in-1
4.9 (2 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
19 students enrolled

Quick Guide to iOS App Development - Novice to Pro!: 4-in-1

Build a custom web browser, a local Notepad app, and an iTunes movies browser using iOS 11 and Swift 4
4.9 (2 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
19 students enrolled
Created by Packt Publishing
Last updated 8/2018
English [Auto-generated]
Current price: $139.99 Original price: $199.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 14.5 hours on-demand video
  • 1 downloadable resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Create various kinds of project, managing files, accessing Xcode's documentation systems, and using the LLDB debugger.
  • Delve into, and master, the most essential features of Swift 4 for iOS development.
  • Get introduced to using secondary development frameworks, such as Apple WebKit.
  • Discover the essential Cocoa design patterns on which Apple (and most third-party) frameworks are based.
  • Move from one screen to another with Segues and see how to pass data from one view controller to another.
  • Enhance UI development for the end user by using a UINavigationController.
  • Explore system networking features to develop your own applications that interact with RESTful web services.
Course content
Expand all 137 lectures 14:29:30
+ A Quick Guide to iOS 11's New Features
21 lectures 03:04:05

This video provides an overview of the entire course. 

Preview 01:29

There are new Large Titles for views in iOS 11, which need to be setup properly. We will see that in this video.

  • If not set up, apps will not utilize Large Titles

  • Learn the difference between the three options for Large Titles

  • Properly set up Large Titles for the ‘My Notes’ application


Large Titles

The search bar in iOS 11 has a new look, which requires the developer to set up. We will set up that in this video.

  • Review how the new Integrated Search Bar looks

  • Enable the Integrated Search Bar with a Navigation Item property

  • Discuss how to modify Integrated Search Bar's scrolling behavior


Integrated Search Bar

The iPhone X has new considerations for user interface with its new sensor housing and home indicator.

  • Review example of incorrect setup for Auto Layout on iPhone X

  • Discuss the SafeArea and setting constraints to it

  • Modify existing Auto Layout constraints to use SafeArea


User Interface on iPhone X

In order to support SiriKit, a new SiriKit Intents extension must be added to the application.

  • Turn on SiriKit support

  • Create the Intents extension

  • Set up the Intents extension to work with our application


SiriKit Intents Extension

Set up the Info.plist for the Intents extension with the Intents supported by the application.

  • Add supported Intents to the Intents extension Info.plist

  • Indicate the security level of supported intents

  • Rebuild application and Intents extension


Intents Extension Info.plist Setup

The application needs to indicate to SiriKit what classes will handle what intents.

  • Create a new class to handle the INCreateNoteIntent

  • Add the appropriate protocol to the new class handling INCreateNoteIntent

  • Indicate to SiriKit what class will handle the INCreateNoteIntent Intent


Principal Class for Intents Extension

SiriKit needs your app to resolve the user's input to something your application understands.

  • Discuss mechanism for resolving intents to SiriKit

  • Implement resolving note title

  • Implement resolving note content


Resolve Method for SiriKit

SiriKit needs your application to confirm it can handle the Intent extension.

  • Discuss mechanism for confirming Intents to SiriKit

  • Implement confirming an Intent has everything needed to create a note


Confirm Method for SiriKit

This video is continuation on implementing the Confirm method for SiriKit.

  • Create a response to send to SiriKit indicating confirmation status


Confirm Method for SiriKit (Continued)

SiriKit needs your application to actually handle the Intent extension (now that it has been resolved and confirmed).

  • Discuss mechanism for handling Intents from SiriKit

  • Implement saving a new note from the Intent data

  • Create a response to send to SiriKit to indicate a note was created


Handle Method for SiriKit

We need to be able to test the Intent Extension in your application.

  • Discuss available methods for testing an Intents extension

  • Test that our Intents extension handles note titles correctly

  • Test that our Intents extension handles note content correctly


Testing the Intents Extension

Implementing dragging data out of the app’s TableView.

  • Add method for dragging data out of TableView within a DragSession

  • Implement providing data to ItemProvider

  • Test dragging data out of the TableView


Drag Delegate on a UITableView

Implementing dropping items onto the TableView in the application.

  • Implement performing a Drop operation with a UITableViewDropCoordinator

  • Handle multiple incoming dragItem’s

  • Test dragging data into the application’s TableView


Drop Delegate on a UITableView

Implementing limiting what data types can be Dropped into the TableView.

  • Only some data types are supported by the app’s data model

  • Let the system know if the TableView can handle a particular UIDropSession

  • Test dragging various data types on the TableView


Drop Delegate on a UITableView (Continued)

Set up returning a Drop Proposal to the system, to better inform the user of what their Drop action will do.

  • Users need to be given visual feedback on their Drop actions

  • Return a UITableViewDropProposal for a particular index path in the TableView

  • Test dropping data onto the TableView at various index paths


Drop Proposal

We will modify the Preview displayed when dragging data from the TableView.

  • We can specify a section of a TableViewCell to display during a Drag

  • Return a UIDragPreviewParameters object to the system for a specified IndexPath

  • Test the Drag Preview in the Simulator


Drag Preview

All Natural Language Processing uses the NSLinguisticTagger class, and a brief overview is needed before using it.

  • Review the NSLinguisticTagger class

  • Discuss what NSLinguisticTagger is used for

  • Review what's new in NSLinguisticTagger in iOS 11


Overview –NSLinguisticTagger Class

Using Natural Language Processing, it is possible to identify the parts of speech of text.

  • Set up an instance of NSLinguisticTagger to identify Parts of Speech

  • Use an NSLinguisticTagger instance to find Parts of Speech

  • Display to the user the Parts of Speech of each word in highlighted text


Using Parts of Speech

Using Natural Language Processing, it is possible to identify the root, or lemma, of particular words.

  • Setup an instance of NSLinguisticTagger to identify the lemmas of words

  • Use an NSLinguisticTagger instance to find the lemma for certain words

  • Display found lemmas to the user


Using Lemmatization

By using Natural Language Processing, it is possible to identify Named Entities within text.

  • Set up an instance of NSLinguisticTagger to identify Named Entities within text

  • Use an NSLinguisticTagger instance to find Named Entities within highlighted text

  • Display found Named Entities, and their classification, to the user


Using Named Entity Recognition
Test your knowledge
4 questions
+ iOS Programming in 7 Days
37 lectures 03:54:57

This video gives an overview of the entire course. 

Preview 06:24

In this video, we will learn how to install Xcode using two different methods.

  • Use the App Store app to download Xcode

  • Download Xcode directly from Apple developer website

  • Install Xcode on your computer ready to be used for development


Xcode Installation

The steps that are needed in order to create first Xcode project will be studied in this video, once the project is created we'll run our first iPhone app.

  • Launch Xcode app downloaded previously

  • Provide all the details required including the app name

  • Create a new project and run the app in the simulator


Creating a New App

In this video, we will learn that Xcode is divided into different sections and each section performs different section. Learn what each section does.

  • Open Xcode from where we left off from last section

  • Have the project navigator and utility section open

  • Learn what the toolbar and debug section does


Quick Tour of Xcode User Interface

In this video, we will learn how to add objects such as label, button and image view to the screen of the app.

  • Open the object library in the utility area

  • Drag a label, button and image view to the app screen

  • Edit objects attributes and align them correctly on the scene


Add a Label, Button, and Image View to App Screen

In this video, we will use Xcode preview tool to see a preview of our app screen on different iPhone screen sizes to avoid running multiple simulators.

  • Open the assistant editor from the tool bar

  • Choose the Storyboard preview tool to from the jump bar

  • Add preview for different iPhone screens sizes


Xcode Preview

In this video, we will use Xcode auto layout tool to pin objects to positions based on the constraints places on them.

  • Select an object and open the Pin tool from the bottom right corner

  • Add constraints to the object, including fixed height constraints

  • Get constraints added to all the objects and preview them

Layout Constraints and Auto Layout Tool

In this video, we will use navigation controller to enable the ability to push one screen on top of another screen.

  • Embed the view controller in a navigation controller

  • Add a title to the newly added navigation bar

  • Launch the app to see how navigation controller works


UINavigation Controller and Text View

In this video, we will learn creating Xcode playground is different from Xcode project, playground allows faster code execution.

  • Create Xcode playground using the welcome screen

  • Get familiar with different section of playground

  • Understand how to create a new playground page


Exploring Playground

There are 4 main data types that are used while writing Swift codes, and knowing the difference between variables and constants is crucial, this will be studied in this video.

  • Create four different variables that model different information

  • Observe the data type using type inference of Swift

  • Use let and var keywords for constants and variables


Swift Data Types, Constants, and Variables

In this video, we are going to set up the Xcode project for the app we need to use throughout the course, and then add automatic layout constraints to all the views.

  • Create a new Xcode project for the MyTasks app

  • Set up the user interface with text field, label, text view and button

  • Use the “Add missing constraints” option to automatically add constraints


Setting Up App User Interface with Auto Layout

In this video, we will learn that in order to be able to perform actions with the button, and also be able to reference the text field and text view, we need to set up IBAction and IBOutlet references in code.

  • Select the object on the storyboard, click the assistant editor

  • Control drag from the object to the code file to set up IBOutlets

  • Control drag from the button to the code file to set up IBAction


Connecting Objects to Code Using IBOutlet and IBAction

In this video, we will learn navigating to other screens sometimes requires segue, we are going to set up modal and show segue and understand the differences.

  • Drag two view controllers from object library to the storyboard

  • Create a modal and show segue to each of the new scenes

  • Set the correct initial view controller for a storyboard


Navigate Using Segue and Initial View Controller

In this video, we will learn while writing codes, we need to be able to perform operations on numbers. We need to learn how to add, subtract, multiply and divide using the arithmetic operators, We also need to learn how to get the remainder of a division and how to inverse a Boolean operation.

  • Learn how to use the arithmetic operators

  • Get remainder of a division using remainder operator

  • Inverse the value of a Boolean using the NOT operator


Using the Arithmetic, Remainder and, Not Operators

In this video, we will learn that we can compare two values using the comparison operators. We can check greater, less and equality of two numbers using these operators. If…else statement allows us to branch to different parts of our code based on certain conditions.

  • Compare two values using the greater, less or equality operator

  • Use if statement to conditionally execute a code block

  • Use else statement to execute an alternative branch/path of code


Comparison Operators and if…else Statement

In this video, we will learn optional values are data types that can hold a value or be empty (nil). There are benefits to using Optional data types, they force code safety and ensure that we do not access variables that do not have values when we need them.

  • Learn what Optional data type is and how to create it.

  • Learn how to check for nil and unwrap Optional data type

  • Use optional binding to unwrap optional type safely


Introduction to Optional

In this video, we will learn part of app development is to be able to validate input fields to ensure that there are valid values before the values are used in an operation. Lack of values can cause a crash when the values are used.

  • Validate text field input using optional binding

  • Validate text view input using optional binding method

  • Combine two optional binding statements for cleaner code


Obtaining User Inputs

In this video, we will learn keyboards are automatically shown when the input fields gain focus, but when the field lose focus the keyboard will not be hidden automatically. Learning to hide the keyboard is crucial and there are different methods that can be used.

  • Use the function of the view to end editing

  • Use large button overlay to hide the keyboard

  • Use the touch began method of the view controller


Dismissing the Keyboard on iOS

In this video we will learn that sometimes in our app we need to create collection of similar items, we may want to have a variable to holds fruits. Array allows us to hold object of similar types, and allows to access each element using an index.

  • Initialize a simple array of string with values

  • Add and remove items from the array using array index

  • Explore more useful array methods and properties


Swift Array

In this video we will learn dictionary also allows collection of items, but there are key differences between array and dictionary. One of these differences is that dictionary does not allow duplicates, unlike array. Dictionary values can be retrieved using keys, indexes are not available in a dictionary.

  • Initialize a simple dictionary with key and value pairs

  • Add and remove values from a dictionary using appropriate keys

  • Explore other useful dictionary methods and properties


Swift Dictionary

In this video we will learn computers are able to do repetitive tasks very fast, and sometimes we need to go through a large data set very quickly, e.g. to find numbers that are multiple of 5 between 1- 1000. Doing this manually will take a long time, but with a loop, this can be achieved in seconds.

  • Write a simple for…in loop using a close and half open range

  • Loop through values in an array, using a specialized for…in loop

  • Iterate through a dictionary using a special for…in loop


Working with Loops and Iterating through Array and Dictionary

In this video we will learn object oriented programming allows us to model our app as an object. Objects have properties and thinking about our code in terms of object we are able to write codes that model real world example. We will create a simple structure that model a real-world object.

  • Understand object oriented programming using real world examples

  • Create a simple structure (struct) that will hold some properties

  • Create multiple objects from the same struct to model real world object


Introduction to Object-Oriented Programming

In this video we will learn that in our task app, we need to be able to pick a date for which the task will be completed. The date picker object allows us to pick date and time and will inform us of the date that we have selected.

  • Add date picker object to the scene and add constraints

  • Use a date formatter to get a correct date format

  • Get the date selected using the value changed event


Exploring DatePicker Object

In this video we will learn that we have been able to obtain the user input for the task name and task description, and then we also added the task date as part of the task details. It's time to put all of these three different data together as one unit. We will create a task object using a struct.

  • Create a task struct with the correct stored properties

  • Create multiple objects from the struct using task data

  • Add task objects to the array using the append method


Save Task Objects in Array

In this video, we will learn that sometimes we want to manage multiple lines of code as one unit, a function allows us to have a code block and then call the code block by name to execute all the codes within the block. Functions and methods are the same thing, however there is one slight difference.

  • Understand what a function is and why it is required

  • Create a simple function and call it by name

  • Create a function that takes one or more parameters


Swift Functions and Methods

In this video, we will learn that modally presented view controller do not have a default close mechanism, unlike views that are pushed using a show segue. In order to dismiss a view controller there are two possible methods that can be used; unwinding segue or calling the dismiss function of a view controller.

  • Use the dismiss function to close a modally presented VC

  • Understand what unwind segue is and how to execute it

  • Write an unwind segue function to dismiss a view controller


Dismissing a View Controller

In this video, we will learn how tab bar controllers allow us to manage multiple screens in a different way to a navigation controller. The screens that are managed by a tab bar controller are more accessible and easier to navigate. Tab bar controllers are commonly used to manage up to 5 important screens that should be one click away from the main screen.

  • Understand the difference between tab bar and navigation controllers

  • Embed a navigation controller in a tab bar controller

  • Add more screens to the tab bar controller


Working with Tab Bar Controller

In this video, we will learn how table view controller is one of the most common objects in IOS development as it allows rows of data to be displayed without much effort. Table view can have multiple sections, and each section also having multiple rows. There are number of methods that we can use to configure how the table view behaves, such as the number of sections or rows it should have.

  • Create a custom table view class for a table view controller object

  • Explore some of the table view methods and their functions

  • Understand cell, rows and section and how they are used


Introduction to Table View Controller

In this video, we will learn how we have an array that holds all of the task objects the user created. Now it is time to display all of these task objects in a table view. We'll use a special table cell that has a subtitle property to achieve this. Table view has different styles, we'll configure an identifier and then use each row of the table to display each element of our task array.

  • Give an identifier to the table view cell

  • Configure the table view cell using the row property of index path

  • Change cell type to use subtitle style to display description


Displaying Task Objects Using Table View Controller

In this video, we will learn alerts are used to interrupt user's interaction with the app, sometimes used to get user's attention when an events occur in our app. Most times events are used as input mechanism, so that the user can confirm that they want to perform certain actions in the app.

  • Create a simple alert and present it to the user

  • Add a cancel action to the alert to dismiss it

  • Add OK action to the alert to run block of code


Showing Alerts with UIAlertController

In this video, we will learn that there are different ways to persist data on iOS but the simplest form is the use of user defaults to save simple types such as String, Int, Float, Boolean and so on. We can also easily retrieve data saved to the user defaults using a valid key.

  • Create a custom class for the favorite view controller

  • Save task description to the user default using alert action

  • Retrieve the saved string on favorite screen for display


Persisting Data Using UserDefaults

In this video, we will learn that the look and feel of the navigation bar can be easily customized without writing a single line of code. Attribute inspector allows us to change some of the common properties of the navigation bar.

  • Change the background color of the navigation bar

  • Change the navigation bar custom font style and size

  • Change the navigation bar button item tint color


Designing the Navigation Bar

In this video, we will learn tab bars can have images but adding these images is not very straightforward. Also, tab bar background color and the default tint color for these images can easily customised using the attribute inspector.

  • Change the tab bar background color using attribute inspector

  • Download tab bar images and add them to the assets folder

  • Add images to tab bar and customize the tint property


Designing the Tab Bar with Images and Colors

In this video we will learn every app starts with a launch screen, which is shown briefly to the user. The app launch screen will give the user a first impression on the design of the app. It's always recommended to have a great design on the launch screen. Launch screen should have similar color theme to the app icon.

  • Download an image to use on the launch screen

  • Add the image to the launch screen storyboard view controller

  • Use a trick to see the launch screen for five seconds


App Launch Screen

In this video we will learn IOS platform requires icons of different sizes for different parts of the app. Generating these icons require us to use an image editing software to do this, but there are many tools that we can use to generate these icons with a click of a button. We also need to create a large icon of size 1024 pixels that will be required on iTunes connect. Finally we'll add these icons to our project.

  • Create a simple icon using the Canva.com website

  • Use the asset catalogue creator app to generate icons assets

  • Add the assets to the project and build the app


Add Icons to the App

In this video we will learn iTunes connect is the website where we manage all the information that the users see on the app store. This information includes the app screenshots, the app icon, the app category, pricing and so on. In order to create a new app on iTunes connect, we first need to set up app ID on Apple developer's account, and then use this app ID to create a new app.

  • Add apple developers program account login credentials to Xcode

  • Create a new App ID on Apple developer's website

  • Create app on iTunes connect using the new app ID


Creating New App on iTunes Connect

In this video we will learn that the last step is to upload the app to iTunes connect from Xcode. We need to use a generic IOS device to create an archive. The archive will be uploaded to iTunes connect as a build which we can submit for review. Before we can submit the app for review we need to provide other important information that are required, and we also need to upload app's screenshots.

  • Check important app settings before creating an archive to upload

  • Generate an archive using a generic iOS device on Xcode

  • Upload the archive and provide required information on iTunes connect


Uploading App to iTunes Connect
Test your knowledge
3 questions
+ iOS Developer Essentials - TableViews
10 lectures 01:59:11

This video gives an overview of the entire course. 

Preview 03:05

The aim of this video is to create a TableView.

  • Find out why TableView is important and where it is used

  • Create a new project in Xcode

  • Add TableView via either a ViewController with a TableView or a TableViewController directly to the playground


Creating a TableView

The aim of this video is to fill the TableView created in the previous video with information.

  • Learn what is DataSource and how the TableView looks for information from there

  • Learn what is delegate and how the TableView looks for information from there

  • Decide how many rows will be inside the TableView and what goes inside of each of the rows


Filling a TableView

The goal of this video is to learn and use arrays for our application.

  • Find out the basics of arrays

  • Create arrays

  • Edit and work with arrays



The goal of this video is to learn and use loops for our application and see how they process data faster than the humans.

  • Learn what is a loop

  • Find out how loops work great with arrays

  • The goal of this video is to learn and use loops for our application and see how they process data faster than the humans



The goal of this video is to learn and implement functions in our application.

  • Learn and implement regular basics functions

  • Learn and implement about functions that take in parameters

  • Learn and implement about functions that return information



The aim of this video is to learn how to work with TableViews and arrays in a combined manner.

  • List an array of emojis and how you want your app to be seen as a final product

  • Create a new project in Xcode called ‘Emoji Dictionary’

  • Set up the ViewController with the TableView inside of it and add emojis via arrays


TableViews with Arrays

The aim of this video is to learn about segues that is learn how to move from one ViewController to another.

  • Create another ViewController where you want to show the desired output

  • Connect the ViewControllers using a segue

  • Use Navigation Controller to embed the ViewController



The goal of this video is to pass information that is send the selected emoji to another ViewController.

  • Represent the second ViewController by creating a Swift file for it

  • Add custom class with this Swift file to the second ViewController

  • Get access to the next ViewController using the segue object that’s passed in


Passing Info

The aim of this video is to challenge you to create a Color app based on the knowledge gained in the previous videos.

  • Use the steps for Emoji Dictionary and implement it to create a Color app

  • Follow the demonstration for the Color app shown in the video and compare the steps with your own app

  • Create a Color app based on the knowledge gained in the previous videos


+ Real-World iOS projects
69 lectures 05:31:17

This video gives an overview of the entire course. 

Preview 04:31

How do I install Xcode?

  • Go to the Mac App Store

  • Locate the Xcode application

  • Then we'll start the install


Getting Xcode

Xcode is a huge application. What are some of the key points to orienting myself?

  • Look at the project settings screen

  • Look at the file navigator

  • Open some Swift source code files and take a look


A Quick Tour of Xcode

What is the iOS simulator? How to I run my app?

  • Look at the device selector and select an iPhone device

  • Start the app building and launch it in the simulator

  • Once it's running, have a look at how the simulator compares to an iPhone hardware device


Running the Template App

How do I access the Xcode debugger? How do I set and remove breakpoints? How do I inspect variables?

  • Add some breakpoints, disable them, enable them, and remove them

  • Run the app, stop at a breakpoint, and see the debugger plane

  • Use the "po" command to inspect a local variable


The Xcode Debugger and Breakpoints

How do I get help about the APIs available to me, and more information about the ones we'll use in this course?

  • Show you where to find the Xcode documentation library browser

  • Quick look help feature to see documentation right in the code editor

  • Use jump to definition to navigate around symbols in your application


Accessing Documentation in Xcode

Our first step is to use a suitable an Xcode project template to get started.

  • Use the template selector for the first time

  • Go through the process of creating a new project

  • Finally, we'll run the template app in the iOS simulator


Creating the Project

We'll learn about Xcode's Interface Builder feature, and how we can use Storyboards to layout our wireframe user interface

  • Discover the two storyboard files included in the template

  • Layout our basic user interface

  • Add a system web view component


Creating the Basic User Interface

We have the overall navigation layout done now. The next step is to add a system web view component to the main view controller in the storyboard

  • Remove the view controller's default root view

  • Find the system WebKit view in the object library

  • Add it to the view controller and wire it up


Creating the Web View Controller User Interface

Optionals are an essential feature on Swift, and if you're new to the language you can't get far without a basic understanding. We'll take some time away from the project to explain their basic purpose and the syntax conventions we'll use to get you started in this course.

  • Explain the problem optional's solve

  • Show a simple example of an optional

  • dDemonstrate the two optional structures we'll use in this course


Introduction to Swift Optionals

We're now ready to start writing our first Swift code; writing custom code in the project's main view controller.

  • Use Xcode refactoring to rename the view controller

  • Create a read-only property to provide a web view reference

  • Try launching our first hardcoded URLRequest


Coding the Web View Controller

Since iOS 9, Apple requires developers to be more explicit with their usage of web resources. For our browser, we need to configure App Transport Security to give us access to the full web.

  • Demonstrate application Info in the project panel

  • Locate the actual Info.plist file

  • Configure appropriate ATS for our web browser


Configuring Application Transport Security (ATS)

The next feature we want to add is browser back and forward buttons, and we'll add these via a view controller toolbar.

  • Start by enabling the toolbar feature in Interface Builder

  • Create view controller properties for the buttons

  • Add those to our enabled toolbar


Adding a Toolbar

We can navigate around from our home page, but we'd like to add URL text input next; then our users have freedom to browse at will.

  • Add a search controller property to the view controller

  • Connect it to our navigation controller

  • Run the app in the simulator and see search in action


Adding a Search Controller

Before we go any further, let's tidy up our code by providing a URL property in the web view controller. We'll be able to use this to conveniently access web view navigation.

  • Check the documentation of WKWebView to understand the getter

  • Define the property and its getter

  • Define the setter, using the URLRequest code from before


Adding a URL Property with Custom Accessors

Our app now has a search controller, but it isn't yet functional. Before we can properly connect it up, we need to learn about the design pattern we'll be using; protocols, and the delegate pattern.

  • Recap how we referenced the web view controller with a conditionally cast property

  • Introduce how delegates talk back to their parent

  • Finish up by outlining the terminology used in this pattern


Protocols and the Delegate Pattern

Now that we're armed with an understanding of how the delegate pattern works, we're ready to employ it, wiring the search bar to talk back to our view controller.

  • Add our first extension and adopt the search bar's delegate protocol in our view controller

  • Do a little refactoring to prepare to load a URL from text input

  • Convert the user's text into a URL and load it in the web view


Wiring Up the Search Bar

Share functionality is at the heart of the iOS user experience, so let's add a share button to our toolbar to allow users to launch other apps that can handle URLs

  • Start by adding another button to our toolbar

  • Introduce UIActivityViewController, the share sheet view controller

  • Create the activity view controller and present it


Adding Share Functionality

Our web browser is simple, so doesn't have a full history feature. However, we can make it a bit more useful by saving the user's last URL to application user defaults.

  • Create our first extensions file

  • Introduce the UserDefaults type and the method's we'll use

  • Define our last URL extension and wire it into our view controller


Saving the Last URL to User Defaults

Our app's functionality is now complete! However, the user interface is still a bit rough. Let's have some fun in this last section, tweaking things and making everything much nicer

  • Our first tweak is to improve the usability of our toolbar

  • Configure the search bar and controller to be more effective

  • Add a simple loading indicator


Improving the Search Bar and Controller Configurations

You will have noticed our toolbar's buttons are too close together. Let's fix that.

  • Check the documentation and find the spacer items

  • Create a convenience initializer for a fixed space

  • Add fixed and flexible spaces to the toolbar


Improving the Toolbar Layout

Our back and forward buttons are always enabled, but it's not always possible to use them. It would be better if they're only enabled when this functionality is available. Let's fix that as our last tweak.

  • Start by disabling both buttons when the app loads

  • Look in the documentation for the delegate protocol to use

  • Implement the delegate method to set the button state


Enabling and Disabling the Back and Forward Buttons

A very important missing piece is a loading indicator. Our users need to know when the web view is loading. Let's add a simple one.

  • Start the networking indicator when navigation is committed

  • Implement the did finish loading delegate method

  • Use this method stop the indicator when loading completes


Adding a Simple Loading Indicator

Our first step is to use a suitable an Xcode project template to get started.

  • Use the template selector for the first time

  • Go through the process of creating a new project

  • Run the template app in the iOS simulator


Intro and Creating the Project

We'll be using a bottom-up approach with this project, and we'll start by designing an interface protocol for our Note model.

  • Create a new file for the Note model

  • Create our first Swift protocol

  • Add a read-only property and two methods


Creating the Note Model Interface

Now that we have the Note interface designed, we can adopt this protocol and implement the Note class.

  • Create a Note class, and adopt the Note protocol

  • Implement the necessary properties

  • Implement the Note's two methods


Implementing the Note Model

We'd like our Note model to automatically generate its title from the body text. To do that, we'll add a little text processing via a property observer.

  • Start by adding a property observer to the body property

  • Process the string to extract the first line

  • Use that to set the Note's title


Auto-Generating the Note Title

We'll going to implement a data source controller to manage our Notes. The first step is to define its interface protocol.

  • Create a new file for the data source

  • Define an update protocol

  • Define the data source's main protocol


Creating the Data Source Interface

Now that we have the data source's protocol defined, let's use it to define the data source class itself. We'll also use custom accessors.

  • Adopt the data source protocol

  • Create the Note array property, with custom access control

  • implement the three required methods


Implementing the Outline Data Source

In order to load and save our Notes, we'll be using the device's internal storage. Whenever we do this, errors can occur. Therefore let's take a few moments to learn about Swift's error handling syntax.

  • Learn about the do scope

  • Learn about using the try keyboard, and error control flow

  • Cover the catch keyboard and the thrown error


Swift Error Handling

Before we can add loading and saving we need to add two features to the data source; the user can specify a JSON filename, and we need to make out Note model Codable.

  • Our first step is to add a custom initializer to the data source

  • Use that filename to generate a file system URL

  • Add Codable conformance to our Note model


Preparing for Loading and Saving

We now have all the pieces in place, so let's add our first implement of loading and saving

  • Add the load method

  • Use pattern matching to catch the file-not-found error

  • Implement save in a similar way


Adding Loading and Saving

The NotificationCenter pattern is another key pattern in iOS application design. We'll be using it to auto-save our Notes. Let's first understand how it works.

  • Start by describing the NotificationCenter

  • Introduce the subscriber and the notification poster

  • See how the NotificationCenter forwards to subscribers


The NotificationCenter Pattern

Now that we understand how the NotificationCenter pattern work, we can employ it to respond to app lifecycle notifications, and auto-save our Notes

  • Start in the documentation, finding the Notifications we want

  • Subscribe to these notifications in the data source's initializer

  • Adjust the save method to allow it to respond


Using Notifications to Save the Data Source

Dispatch is the core technology you can use to perform simple asynchronous tasks on iOS. We'll be using it make our load and save methods asynchronous. Before we do that, let's explain the common pattern we'll use.

  • Start by describing the pattern of dispatching to a work queue

  • Note the crucial point about dispatch back to the main queue for UI updates

  • Explain the basic syntax of Swift closures


Introduction to Dispatch and Closures

Now that we understand the Dispatch pattern we'll use, let's add it to our load and save methods

  • Add a global work queue property

  • Implement the simpler save method

  • Implement the load method, and add a closure completion callback


Adding Dispatch to Load and Save

We're now ready to work on the user interface. We're using UISplitViewController, which has powerful features for creating a standard master/detail hierarchy, and automatically supports the full range of iOS devices.

  • Explore the configuration changes we need to make

  • Subclass and customize the split view controller to fix it for iPad

  • Make a final adjustment for the iPhone Plus in landscape


Configuring the SplitViewController

Now we're ready to turn out attention to the master (table) view controller. We'll prepare it to load data into the table in the next video.

  • Clear out the file so we can focus

  • Add a property for the Note data source

  • Adjust the file, and add the data source load call


Preparing the MasterViewController

We now have everything ready to start providing data to the master view controller table. This is another key pattern that forms the core of many iOS apps.

  • Start by introducing data source protocol and IndexPath types

  • Implement the row count method

  • Implement the cell dequeue method



The native editing support for iOS is beautifully designed, and we can add this functionality to our app just by implementing two more table data source methods.

  • Instruct the data source that our rows are editable

  • Implement the commit editing method

  • Use this method to remove the Note from the data source


Adding TableView Editing

We now turn our attention to the detail (editor) view controller. The first thing we need to do is customize its view with a text editing view. We'll use the same method we employed in the WebBrowse project.

  • Start by replacing the storyboard's root view

  • Clear out the DetailViewController boilerplate code

  • Define a property to point to the text view


The DetailViewController User Interface

Now that we have the detail view controller designed in the storyboard, it's time to add code to respond to the Note model.

  • Start by creating a protocol that describes the interface

  • Add the Note model property and observer

  • Define the set and clear method


Preparing the DetailViewController

The DetailViewController is now ready to receive a Note model. The next step is to pass the selected Note from the MasterViewController. We do this by using the pattern of intercepting the storyboard's transition.

  • Discover the storyboard show detail segue

  • Override the prepare for Segue method

  • Examine the segue properties, and pass the Note model on to the DetailViewController


Passing the Note Model

Now that we're able to pass the Note model to the detail view, it's time to configure the DetailViewController properties to display the Note.

  • Start by focussing on the configureView method

  • Configure the view's properties based on the state of the Note

  • Check that we handled the empty Note edge case


Configuring the DetailViewController

We can now edit Note text, but we'll discover that our user interface doesn't behave how we'd like when the keyboard is displayed; our text will disappear behind the keyboard! This is a classic problem with a fiddly solution. In this section we'll present a model solution.

  • Add a responder method

  • Add observance to a keyboard Notification

  • Use the Notification's payload to adjust the view above the keyboard


Handling the Software Keyboard

Now we have Note editing, but our updates aren't displayed live if the MasterViewController is visible. In order to fix this we'll again employ the delegate pattern.

  • Create an extension to adopt the TextViewDelegate protocol

  • Set the view controller as the text view's delegate

  • Preview the delegate behavior


Using the TextViewDelegate and Creating a NoteUpdateDelegate Protocol

Now that we can respond to the text view's changes, we need a way to pass that information back to the master view controller. In order to do this, we'll define our own delegate protocol.

  • Start by defining our detail view controller update protocol

  • Make sure to note some important delegate conventions

  • Call the delegate and update the MasterViewController


Passing Back Note Changes to the MasterViewController

We have just one more major edge case to cover; if the user deletes the currently selected Note it will stay in the editor view. Let's fix this by implementing the Equatable protocol on our Note model.

  • Add a conditional to the commit editing method

  • Extract the detail view controller and examine its Note

  • Complete this feature by adding Equatable protocol conformance to the Note model


Updating the DetailViewController after Note Delete

We're ready now to start our third and final project; iTunesMovies, a beautiful feed brower for the iTunes Movie Store.

  • Start by presenting the project

  • List its user features

  • Introduce the components we'll be working with


Getting Started

In order to implement our custom JSON parsing in the project, we'll be working interactively in an Xcode playground; a great way to experiment and prototype features.

  • Start by downloading a sample feed from iTunes

  • Create an empty playground in Xcode, and add the JSON file

  • Load the JSON file into the playground as text


Preparing an Xcode Playground

We already used the simplest JSON coding in Noted, but this time we have to adapt to a public API. This means we have more work to do! We'll start by covering the simplest properties that don't require customization.

  • Create empty entities for feed and movie

  • Use a dictionary trick to decode the feed content

  • Add the simple properties than can be automatically decoded


Decoding Simple JSON Properties

Our next step is to customize the mapping between JSON property names and the Swift property names we'd prefer to use. We'll do this using custom CodingKeys.

  • Review the syntax required for the CodingKeys enum

  • Return to the Playground and add a CodingKeys enum

  • Customize the naming of our decoded properties


Custom Property Name Mapping

The JSON output contains a nested Genre object. Let's parse this by adding a nested type to the Movie struct.

  • Create a Codable Genre struct

  • Add a Genre array property to Movie

  • Customize the parsing of Genre with CodingKeys


Decoding Nested Objects

The final Movie property we need to decode is its release date. To do this we need to add a DateFormatter to convert the date string into a Date type.

  • Add a static date formatter property to the Movie type

  • Customize its date format property to match the JSON

  • Customize the JSON decoder's date decoding strategy


Date Decoding

As with Noted, we'll create a data source type to hold our Movie structs, and handle downloading the feed from iTunes.

  • Create a protocol to describe the data source's interface

  • Define our first error type

  • Implement the data source and basic functions


Creating the Outline Data Source

Now we need to get ready to download the Movie feed. Before we do this we need to add some more properties and methods to the data source.

  • Add a URLSession property

  • Add an empty result processing method

  • Implement the outline of the fetch method


Preparing to Fetch the Movie Feed

We're almost ready to do our first network request. When we do so, we should think about all the possible failure cases that can occur. This can be quite complex. In order to handle these cases, we'll present a neat and logical pattern you can use with a Swift switch statement and its Tuple pattern matching capabilities

  • Outline a switch statement

  • Create a Tuple to match on

  • Work logically through implementing the various cases we'll handle


Switch Tuple Pattern Matching

The final missing piece for downloading the feed is the processResults method. We'll now go back and use the switch statement technique to process its cases.

  • Add a switch statement, matching the parameters

  • Handle the simple error cases

  • Implement the success case and decode the feed


Processing the Movie Feed Results

We're done with handling the feed data. Now we turn to the user interface. First of all we'll get the overall structure ready

  • Outline the steps that you can take to set up the split view controller

  • Add a collection view controller to the storyboard

  • Implement the outline master view controller


Laying Out the Basic User Interface

Soon we'll be downloading images for our Movie posters. When we do so, we should think about caching those images to improve performance. In this video we'll implement a simple image cache controller

  • Start by designing the image cache's interface protocol

  • Implement the cache struct, adding properties

  • Implement the main cache fetch method including image download


Creating an Image Cache Controller

We want to display a beautiful feed of Movie posters. In order to do that, we need to implement a custom table view cell with an image view component.

  • Create an empty collection view cell subclass

  • Customize the cell layout in the storyboard

  • Add a configure method in the cell subclass


Creating a Custom Collection View Cell

Just like UITableView, which we worked with previously, UICollectionView requests data with a data source protocol. We now have every piece in place, so it's time to add this.

  • Start by adding the initial collection view reload call

  • Implement the item count method

  • Implement the cell vending method


Collection View Data Source

We can now display our feed, and its movie images on screen! However, the layout on-screen isn't what we'd like. In order to fix this, we need to customize the collection view' layout

  • Customize a few properties for the layout in the storyboard

  • Add the flow layout's dynamic sizing method

  • Calculate a cell size that provides the best sizing onscreen


Customizing the Collection View Layout

Hopefully you've discovered by now that UICollectionView and UITableView function by using a queue of reusable cells. This means we need to bear this in mind, especially when we perform asynchronous operations. We'll reveal this problem, and provide some typical solutions

  • Start by demonstrating the kinds of bugs that can occur with cell reuse

  • Our first fix is to implement the prepareForReuse

  • Add a feature to ensure we don't replace the wrong image


Handling Cell Reuse

Just as with Noted, the iTunesMovies app passes a movie struct from the master view to the detail view. So, as this process is similar, you should try to implement it yourself.

  • Discuss the properties you need to add to the detail view

  • Remind of the prepareForSegue method

  • Hint at some of the differences in the process for UICollectionView


Passing Data to the DetailViewController

Our final UI piece is the DetailViewController, where we'll display some of the Movie's properties, and provide a button to launch the Movie in the iTunes store. We'll start by laying out its user interface.

  • Replace the DetailViewController with a table view

  • Add an image view as the table's header

  • Layout out the static cells and their outlet properties


Laying Out the DetailViewController

We're almost done! All we have left is to display the Movie's properties in the DetailViewController. In order to do so we'll add a couple of convenience properties, and configure the user interface.

  • Prepare by creating a Genre description method, and adding another DateFormatter

  • Set all of the static table view cell labels

  • Add the ability to open the Movie in the iTunes Store


Displaying Movie Properties in the DetailViewController

Our app is now done! But as ever, there's plenty more we could do. Our first improvement is to add the common pull-to-refresh pattern to allow the user to reload the feed. This is very easy with the native refresh control component.

  • Refactor a little to prepare

  • Add the refresh control to the view controller and collection view

  • Make sure that the refresh control stops when the load finishes


Adding Pull-to-Refresh

Our last tweak is to add a loading indicator. This time we'll use the common activity indicator component, rather than the status bar indicator we previously used.

  • Create an extension on UIBarButtonItem

  • Create an accessor that vends a button with internal loading indicator

  • Display it in the master view controller during the feed load


Adding a Loading Indicator
Test your knowledge
5 questions
  • Viewers should be familiar with Xcode and have at least a passing familiarity with the Swift programming language and its design tenets.
  • Prior basic knowledge iOS programming be helpful.

Are you looking to become an iOS developer or are wondering what it would be to develop apps for the iOS platform? Get this course and begin your journey to become an iOS developer in 7 Days!

The world’s most beloved mobile platform, iOS is a fun to develop apps for! Developing iOS Apps (Swift) is the perfect starting point for learning to create apps that run on iPhone and iPad. iOS App Development with Swift specialization, expands your programming skills and applies them to authentic app development projects.

One of the pillars of iOS development is learning to work with a TableView. TableViews allow us to show a list of items to the user. We can see this in the Music app, the Settings app, Twitter, Facebook, and almost every app on our phones. This course will teach you the basics of TableViews, which are essential to making iOS apps in a fun-filled and engaging way.

This comprehensive 4-in-1 course is a step-by-step tutorial providing practical, actionable guidance through iOS development. It covers step-by-step instructions and explanation that will not only develop your understanding, but also show you how to put your knowledge to work. Explore and use a wide range of Apple software development kits and tools to become a confident iOS developer. Create a fully functional TableViews from scratch while exploring all of its features and functions. Create an Emoji Dictionary App that will help you learn about emojis in detail.

Contents and Overview

This training program includes 4 complete courses, carefully chosen to give you the most comprehensive training possible.

The first course, A Quick Guide to iOS 11's New Features, covers familiarizing yourself with the new features of iOS 11, to solve real-world problems and gain valuable insights. This course covers implementing SiriKit's new Notes Domain, and how to create Notes using your voice and the power of Siri. Implement Drag and Drop in your application in the UITableView for use on both the iPad and iPhone. Utilize Parts of Speech, Lemmatization, and Named Entity Recognition in your apps.

The second course, iOS Programming in 7 Days, covers building and publishing a complete iOS app from scratch. This course will guide you on your way to becoming an iOS Developer in 7 Days. Explore the user interface and learn how to navigate around. Get hands-on experience with Swift and learn some of its basics. Learn about Swift operators and how a navigation controller manages one or more child view controllers in a navigation hierarchy. Add app icon and the launch screens and then prepare the app for the app store.

The third course, iOS Developer Essentials - TableViews, covers building amazing iOS 11 Applications with Swift 4. Dive into the topics of arrays, loops, and functions. We’ll show how arrays are immensely helpful when working with TableViews and are the backbone for displaying data. Learn how loops help us harness Swift to do an insane amount of processing that we as humans could never do. Cover functions which allow us to organize our code and make it more efficient. Then we bring it all together in an Emoji Dictionary app. This app lists a bunch of emojis that we find interesting. When a user taps on an emoji, we’ll then show the emoji magnified to see all details. We’ll also provide a definition of the emoji to the user. This course will help you learn some awesome iOS techniques.

By the end of the video course, you’ll know how to build simple iOS apps using the TableView structure and also know the intermediate swift programming language.

The fourth course, Real-World iOS Projects, covers building a custom web browser, a local Notepad app, and an iTunes movies browser using Swift 4 and the native iOS Cocoa Touch development platform. You'll develop three native iOS applications, using the core UIKit application framework and the latest version of Apple's new and exciting Swift programming language. Build your first app from scratch - a custom web browser with your own custom controls, page history, and sharing functionality. Once the web browser is ready, you'll head straight into your second project, which is a note-taking app, which will permit full text editing and will store its data as JSON on your local device's file system. Your final project will be a rich, smooth, and colorful media-heavy app that navigates movies in the iTunes store, smoothly browses through posters, and explores their details.

By the end of the course, after focusing on getting real results, you'll be equipped with the skills to get started turning your development career dream into a reality!

By the end of the course, you’ll build a custom web browser, a local Notepad app, and an iTunes movies browser using iOS 11 and Swift 4 and be confident in your journey of developing for iOS platform and be able to build your own app and publish your app to the App Store.

About the Authors

●        Jonathan Daley co-founded independent game studio Nacelle Games with his wife Carrie Daley, in 2014. Since then they've shipped several games and apps for iOS and tvOS, as well as consulted on several VR projects. Jonathan has programmed and/or designed over 20 games and apps since 2013, using everything from the Unreal Engine 4 and Unity 3D game engines, to programming games and apps from scratch in Xcode and Visual Studio—for iOS, MacOS, and Windows. He has also created several hours of professional training courses on game development in Unreal Engine 4 for Digital-Tutors (now Pluralsight), for Packt Publishing, and on his personal YouTube Channel. He can be found on Twitter @JonathanADaley.

●        Dee Aliyu Odumosu has developed over 120 apps for clients, including both individuals and start-ups, from around the world. The apps range from basic to very complex; some can be found on his website. Dee's passion for computer programming began in 2006 with his first contact with the Java programming language. He continued to learn different languages, including Microsoft ASP.NET, Ruby on Rails, C#, some PHP and HTML, and CSS. Dee briefly pursued a MCSE (Microsoft Certified System Engineer) certification before he decided he wanted to become a full-time programmer. He achieved Microsoft Certified Professional status. For the last 4 years, Dee has been programming the iPhone using Objective-C and Swift.

●        Nick Walter is an iOS developer who has been focused on mobile app design and creation for over ive5 years. His involvement in the iOS community started off with a bang, and in 2013 he was one of the 25 students worldwide to be invited to Apple's Cocoa Camp. Within the community, he is also co-president of an Apple developer group called Cocoa Heads. He always wanted to transform brand-new ideas into reality, but growing up in a small town he had limited access to the required programming resources. This led to his early interest in online education. After experimenting with various companies, learning styles, and teaching processes, he adopted the best strategies and applied them while creating his courses. Since the announcement of the new Swift programming language by Apple, he has devoted himself to Apple's documentation and any online resource that was available. Prior to teaching the internet's first course on Swift, he created five iOS apps from scratch that are currently live in the App Store and are being used by thousands of users worldwide.

●        Jonathan Crooke has been a professional iOS developer since 2009. He has worked on applications with userbases in the millions, from media and social media applications to e-commerce, learning, and productivity applications for the iPhone, iPad, and Apple Watch, for companies such as SoundCloud, EyeEm, Memrise, and Zalando. He has followed the development of iOS iPhoneOS 3.0 and has written popular open source tools, spoken at conferences, and taught and shared his skills with learners. He will show you how to get started, and start getting results immediately!

Who this course is for:
  • Complete beginners who are interested in developing iOS apps, or for developers who are already programming in other languages but are fascinated by the ease of iOS development tools and Apple SDK.
  • iOS developers who either have existing apps on the App Store, or are busy creating the next big breakthrough app!