KVO and KVC or Key-Value Observing and Key-Value Coding are mechanisms originally built and provided by Objective-C that allows us to locate and interact with the underlying properties of a class that inherits
NSObject at runtime. In short this mean that you can interact with a property through a stringly typed key instead of your usual dot syntax which is checked at compile time.
In this post I will explain how to use KVC and KVO through an example that will further explain the terms. …
This is an update to my original post Reusing code with Swift frameworks. The original post showed how to reuse UIKit based code packaged as a framework. Since then Apple has introduced SwiftUI and this post will show you how to reuse your SwiftUI code.
SwiftUI has brought a natively supported declarative way of building UI’s. Furthermore SwiftUI and Xcode encourage you to build small components which can easily be reused. But what if you want to use the same components across multiple projects?
You might want to build another product for your company and make the app have the…
Storyboards and Interface Builder(IB) are great when you start a new UIKit based iOS project. However they can soon loose their appeal as you develop more complex screens, UIs and user flows.
Alternatively you can start develop your UI programmatically. However developing and managing UIScrollView’s programmatically can be tricky and easy to forget how to.
In this tutorial I’ll show you how to create a UIScrollView and manage its content programmatically. We’ll be starting off from an existing iOS app project.
In the app we’ll be displaying the recipe on how to make Paella using
This article is about how to do Dependency Injection in Swift using Property Wrappers. I assume you are familiar with Dependency Injection and Swift Property Wrappers. Furthermore you should be familiar with the basics of Swift and iOS development.
What is dependency injection? Dependency Injection is a form of Inversion of Control that moves the responsibility of assembling objects to a container.
Why use dependency injection? Amongst other things it allows you to:
What is a property wrapper in Swift?
A property wrapper adds a layer of separation between code that manages how a property is stored and the code that defines a property.
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:
I assume you are familiar with these already. …
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:
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. …
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 word Cryptography is derived from the Greek words Kryptos and Graphy. Kryptos means hidden and Graphy means writing. Thus Cryptography means hidden writing.
the science or study of the techniques of secret writing, especially code and cipher systems, methods, and the like
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.
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:
Additionally to the above other iOS developers are likely to be familiar with this pattern and thus easily get acquainted with your code.
Content is King
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:
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: