Swift Programming

Learn what property wrappers are and how to use them

Image for post
Image for post
Photo by Ronise daluz on Unsplash

What is a property wrapper in Swift?

In all honesty when I read this bit from Swift.org’s documentation I did not quite understand what property wrappers are. So again what is a property wrapper in Swift?

Before I explain Swift Property Wrappers let’s briefly recap two other Swift features:

  1. lazy loading properties
  2. optionals

I assume you are familiar with these already. …


Learn how to perform multiple task concurrently in iOS

Image for post
Image for post
Photo by Braden Collum on Unsplash

How do you execute multiple pieces of code at the same time? When beginning coding we are taught code that executes serially or one after the other in order.

Let’s look at an example. Let’s say you’re making a simple salad. Here are the ingredients:

  • lettuce
  • tomatoes
  • red onion
  • sweetcorn
  • tuna with sunflower oil

The process is simple: cut what needs cutting and mix it all.


This simple salad does not has a specific order in which to add the ingredients. …

Computer Vision

Everything you need to get up and running to develop and debug an OpenCV C++ algorithm

Image for post
Image for post

Looking to solve Computer Vision problems using OpenCV? Maybe you are developing an OpenCV algorithm to be used on multiple platforms like iOS and Android.

A great way to develop cross-platform OpenCV algorithms is by writing them in C++ and using Xcode. Both platforms support running and binding to C++ code. However developing an OpenCV algorithm inside §By testing your OpenCV C++ algorithm on your Mac you can save time and effort when developing the algorithm.

The aim of this post is to help you get up and running developing and debugging an OpenCV C++ algorithms. …


Does the word cryptography sound cryptic? Read on to learn about cryptography and remove the mystery

Image for post
Image for post
Photo by Georg Bommeli on Unsplash

The word Cryptography is derived from the Greek words Kryptos and Graphy. Kryptos means hidden and Graphy means writing. Thus Cryptography means hidden writing.

This post is an introduction to cryptography. The aim of this post is for all audiences to understand what Cryptography is. We will first look into the origins of Cryptography. Then we will cover Cryptography terminology. Finally I will explain how modern Cryptography works.

You don’t need any skills to consume this post.

The origins

The first form of cryptography recorded–that is sending a secret message–was first recorded around 100BC. The method to hide a message was by shifting each letter in the message by a specific number of letters in the alphabet. For example by shifting the letter A by 3 places to right the letter becomes D. …


Design patterns are great tools to solve reoccurring problems in software design. They are blueprints of solutions you can apply.

One of the most important design patterns on iOS is the delegate pattern. It is the design pattern most commonly used in many Apple frameworks and libraries. Being familiar with this pattern will:

  • Add a tool to solve reoccurring software problems in your code
  • Quickly navigate and use Apple APIs

Additionally to the above other iOS developers are likely to be familiar with this pattern and thus easily get acquainted with your code.

In this post I will help you understand the delegate pattern. Then we’ll look when to use the delegate pattern. Finally we’ll look at an example from Apple’s UIKit framework. …


Learn how to create your own static site easy without using a website builder

Image for post
Image for post
GatsbyJs logo

There are many reasons why you should blog. The main focus point of a blog is its content. And content is king. There are some options on where to post. However if you have decided to create a personal blog site then these are some of your options:

  • Use a content management system
  • Create you own website from scratch

In the past I have used WordPress. However as a developer I find it very frustrating how complex some of these content management systems are. Some of the drawbacks:

  • adding custom plugins requires some knowledge of the…


Image for post
Image for post
Photo by Markus Winkler on Unsplash

Most users and customers guide themselves from user ratings before deciding on what to purchase or what to consume. Ratings can increase engagement with your content. They can also be used as simple feedback mechanism which is quick and easy to respond to than going through surveys.


Customise the accessibility experience in iOS

Image for post
Image for post
Photo by Daniel Korpai on Unsplash

It’s paramount more than ever to make your app accessible and inclusive to all of your audience. Not only its a law but it’s also a question of ethics. Making good accessible apps is thus our responsibility.

Apple has been leading and innovating in accessibility. Each year Apple introduces features that enhances the accessibility in their products and software. They extend and even promote accessibility features to developers for their operating systems through their API’s.

This blog post is about how to leverage accessibility API’s on iOS UIKit. In this post we’ll create a progress bar that can be used for uploads. We’ll be drawing the progress bar. This progress bar will be useable for some users, however visually impaired users who rely using the VoiceOver will not be able to consume our progress bar. VoiceOver is an iOS feature that reads the screen to the user. We’ll need to make adjustment to the accessibility properties on our progress bar to make it useable by visually impaired users. …

When Apple announced the September 2020 “Time Flies” event, most focused on the new Apple Watch Series 6 and its rumoured cheaper version the Apple Watch SE, logically.

The Apple Watch Series 6 and SE were interesting. However I was more interested in the renewed iPad Air. There were many interesting things about the new iPad Air.

They got rid of the old home button and placed an almost edge-to-edge screen. Similar to the iPad Pro. However, unlike the iPad Pro the renewed iPad Air has no FaceID. Interestingly it has a new TouchID. …


Learn how to consume C++ code in Swift

Image for post
Image for post
Designed by Ana Movileanu

Is there a C++ library you’d like to consume in your iOS application? C++ is a low level programming language that has been around for over 35 years now.

Whilst C++ is a very old and complicated language and it is still very much relevant in todays world. C++ is predominantly used when higher performance is required. Examples of such libraries are Unreal Engine for gaming and OpenCV for live computer vision.

In fact Apple still employs C++ to write some of its most popular and performance requiring features. Rumour is that the Animoji feature is written in C++.

If you are building some C++ features in you Swift iOS app then consuming C++ from Swift is no straight forward task. …


Anurag Ajwani

Senior iOS Engineer @ Onfido. Writing weekly blogs on iOS and programming. Follow me to stay tuned!

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