When we are developing an application, there are many important things to consider, such as architecture, libraries, and language.
But as a developer and graphic designer at the same time, I think one of the most important aspects of the application is how it looks. The user appreciates a good-looking app. That’s why we have UX teams that take care of this incredible task, and they provide us with interfaces designed for better user experiences.
So I think it’s a good idea for my first post to be focused on a tool to help us better complete this task.
This class is going to handle two fundamental visual aspects of the app color and typography.
Handling the Color
First, we need an extension that can handle hexadecimal colors. Let’s be honest: Most of the time the designer sends us the colors in this format
#f5f5f5 instead of a color of the type
UIColor (red: 0.96, green: 0.96, blue: 0.96, alpha: 1.0).
First of all, we will create our
enum to have a group of related colors and then a function that processes the selected color and returns a
How to use it:
Handling Text Style
For the accounts, we need to establish the style and size.
So first we create the
enum with the styles.
We also need to manage the sizes.
Then we create the function with which we will obtain the desired font with its size.
And we are done!
Now enjoy your style manager, and set color and typography consistently.