You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should be centralizing the constants that we are using throughout our codebase. My first suggestion for this could be for margins that we are using. For instance, I aim for sth like this:
enum Constants {
enum Margin {
static let extraSmall: CGFloat = 4
static let small: CGFloat = 8
static let medium: CGFloat = 16
static let large: CGFloat = 24
static let extraLarge: CGFloat = 32
}
}
Here, using an an enum and static properties let use to reach them directly. Also, by using an enum, we are making sure that no one can instantiate Constants.
The text was updated successfully, but these errors were encountered:
We should be centralizing the constants that we are using throughout our codebase. My first suggestion for this could be for margins that we are using. For instance, I aim for sth like this:
Here, using an an enum and static properties let use to reach them directly. Also, by using an enum, we are making sure that no one can instantiate
Constants
.The text was updated successfully, but these errors were encountered: