You’re not restricted anymore!

Image for post
Image for post
Photo by Ben Wicks on Unsplash

Difficulty: Beginner | Easy | Normal | Challenging
This article has been developed using Xcode 12.0, and Swift 5.3

Prerequisites:

Dependency Injection

Motivation

High level modules should not be dependent on low-level modules, but rather abstractions. If this is true, we can swap out classes rather than making a fixed dependency for a concrete class.

Why it matters

If you are using a network service (say…


A whole project?

Image for post
Image for post
Photo by Michael Dziedzic on Unsplash

Before we start

Difficulty: Beginner | Easy | Normal | Challenging

The video

The content of this article is covered in the following video!

Prerequisites:

Keywords and Terminology:

JSON: JavaScript Object Notation, a lightweight format for storing and transporting data Swift: An…


It all went wrong!

Image for post
Image for post
Photo by Gavin Allanwood

Difficulty: Beginner | Easy | Normal | Challenging

When you are looking through the use of Protocols in Swift, you’ll come across [Dynamic Dispatch].

When a type adopts a protocol and an instance of the type is inferred to be a concrete type, all of the protocol methods are statically dispatched at compile time.

So a concrete instance of a Dog can conform to a protocol Animal, and here fluffy is inferred to be of concrete type Dog. …


You don’t need a backend (right now)

Image for post
Image for post

Difficulty: Beginner | Easy | Normal | Challenging
This article has been developed using Xcode 12, and Swift 5.3

Prerequisites:

Terminology

Charles: A HTTP proxy for development

A warning

Be careful because many guides instruct developers to turn off the mac proxy, but using this simulator this prevents the developer seeing the data from their target App!


It will make them better, promise

Image for post
Image for post
Photo by Eric Brehm on Unsplash

I’ve written one or two articles on Medium in my time, and most of them are based around creating a journal around my programming adventures, primarily coding in Swift.

Then I discovered that it is all too difficult to read

What is worse is that I made the same mistake multiple times, in different ways. You might think that isn’t possible, but I’m here to tell you that it is, in fact possible.

Code blocks

So what I started doing, in the beginning was to simply write code in one of Medium’s code blocks:

print ("Hello, World!")

It is all clear, understandable…


Do yourself a SOLID

Image for post
Image for post
Photo by dylan nolte on Unsplash

SOLID is a mnemonic acronym for five design principles intended to make software designs more understandable. Now applying them to Swift can be a little tricky, and this article has been written to make the Single Responsibility Principle easy to understand for new Swift Programmers.

Solid.

Difficulty: Beginner | Easy | Normal | Challenging

Terminology

Class: An object that defines properties and methods in common

Single Responsibility Principle: every module or class should have responsibility over a single part of the functionality provided by the software, and that responsibility should be entirely encapsulated by the class, module or function

SOLID: a…


Get rid of unreadable habits

Image for post
Image for post
Image by Art Lasovsky on Unsplash

Difficulty: Beginner | Easy | Normal | Challenging

Look, I’m not the best person at anything. Enforcing my own coding standards for my own projects? Awful. I can’t even speel well in my Medium Posts.

Is there some way that I automate writing better Swift?

Before we start

Who is this guide for?

You might say that the steps for this article are contained in the repo for SwiftLint: https://github.com/realm/SwiftLint, indeed they are.

But this is a beginners guide with a repo that contains a example of the implementation and the code that I’ve run through.

What is SwiftLint for?

SwiftLint is for enforcing Swift coding style and conventions. This means that…


Image for post
Image for post
Photo by Amy Hirschi on Unsplash

It’s a New Year!

Perhaps you are looking for a new job, or are thinking about upgrading your developer self.

Why not use this quick list of Interview Questions and Answers?

Hand-picked and selected for 2021, these are the terms and questions that you need to know for your iOS dev role!

The List

app ID / bundle ID App ID identifies one or more Apps from a development team. Bundle ID uniquely identifies each App. AppID is local, BundleID is on Apple’s side.

Access control open, public, internal, fileprivate and private.

App states Not running, inactive, active, background and suspended. Not…


The view coordinate system is really important

Image for post
Image for post
Photo by Tim Marshall on Unsplash

Difficulty: Beginner | Easy | Normal | Challenging

Prerequisites:

The View coordinate system

The Units and structs used

CGFloat: A floating point number used for graphics
CGPoint: A C struct containing two CGFloats
CGRect: A C struct with an origin and a size (both of which are representated as a CGSize). Can be initialised with CGRect(origin:, size:) or CGRect(x: 0, y: , width: , height: ) . The origin is represented as a CGPoint.
CGSize: A C struct with a width and height.

The origin

The origin of any particular…


Create it from Scratch in Swift, for fun!

Image for post
Image for post

This article is going to show you how to make a snowy App using Swift.

It is going to look like the following:

Steven Curtis

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