How to use vector images in Xcode

25 February 2021

Xcode 7 gave us the ability to add pdf files to use as vectors but it was pre generating images for all sizes that we need (1x, 2x, 3x you know the drill). What Xcode 12 added last year was the ability to preserve its vector data and also SVG support as well. In this post we are going to explain how to use that in your project.

read more

How to add gradient to any view

08 February 2020

In this article I am going to show how to add a gradient to any view without protocols. In it we will use CAGradientLayer to draw the gradient; An extension of CALayer for finding the created layer so we can skip the assignment to a property; And an UIView extension for using and customizing the gradient.

read more

How to create badge in iOS

07 February 2020

With every new version of your mobile app you have something new to share with the user. The best solution is to hint it with a visual clue. But how to make that gently without annoying the user and keep him curious?

The best and most common approach is to add a notification badge. Yes, this is the tiny red dot at the top which we all know.

read more

Shake animation

07 February 2020

Often we need to make alerts to show that a particular text field that is required is empty when a button is tapped, like in the login or registration screens. This is a hassle because on almost any app that we are developing we have localization that we need to handle as well. One day a designer that I worked with came up with the idea that we can shake that field or buttons that are disabled. Maybe he saw it somewhere but I really liked it.

read more