In this section, we will learn to draw simple shapes, gradients, or even images. You will need to draw shapes, lines, and images to create custom components or to use in drawing apps where the user can draw shapes and generate an image of their drawing.
Drawing text, images, lines, rectangles, and gradients
Getting ready
When you need to do any custom drawing in iOS, you will need the help of the Core Graphics framework. This framework is full of cool APIs that you can use to build awesome things. In this section, we will see how to use it to sketch custom drawings in custom UIView. In the following demo, we will draw a custom face with eyes, a nose, and a mouth.