Enabling a user to be able to save and retrieve images within an app is a common app requirement which can enrich the user experience. Following is a basic tutorial for accomplishing this task.

Create Xcode project with Core Data

First, create a new Xcode project (with Core Data checkbox checked) with an imageView and two…


When testing an app that uses location services, it’s helpful to know that the simulator can simulate a real phone that changes its location.

Accessing Location:

For Xcode 12, with the Simulator focused, access the location menu from Features > Location:


Fetching, parsing, and using JSON data from an API is an important skill to know as an iOS developer. Following is a simple example to get you started.

What API will be used?

To keep it simple, we will be fetching a random quote from api.quotable.io. …


Getting and using a user’s location is needed for many map-based apps and for consuming location-oriented API’s. But it doesn’t have to be complicated! Here we’ll create a simple geolocation service that can send a user’s location to any view controller.

** Connect to an actual device to see results…


keyboard overlapping textfield

The problem:

When building forms outside of a table view, it’s important to account for the keyboard ‘showing’ and ‘hiding’ upon user input, as the keyboard may overlap the text input, making it inaccessible.

Why this solution?

Of the many recommended solutions to this problem found on the internet, this…


conforming to the BGColorDelegate

What is Delegation?

The protocol-delegate (aka ‘Delegation’) design pattern is commonly used to facilitate communication and pass data between view controllers.

Delegation allows one class to ‘delegate’ some type of action to be performed by another class.

A very simple example will be shown to illustrate the basic concept of…


What are enums?

An enumeration, or ‘enum’, is a user-defined type used to group a set of related values. Some other examples of related values that could be encapsulated in an enum: shapes (circle, rectangle, oval, square, etc.), planets, colors, or ice cream flavors.

Enums are defined with the ‘enum’ keyword, the capitalized…


What are optionals?

Swift does not have a “null” data type as found in other programming languages. Swift instead uses optional syntax to describe a variable (or constant) that may or may not have a value. If the optional variable (or constant) does not contain a value, it is known to be nil


array examples

Description

Arrays are a common collection type found in the Swift programming language. Arrays are used to store an ordered list (aka ‘collection’) of values, sometimes referred to as ‘items’ or ‘elements’. The items in the list must all be of the same data type, meaning Boolean(Bool), String, Character, Int(Integer), Double…

Chris Banning

Full Stack React Native & iOS Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store