SwiftUI
Swift Langauge version — Swift 5
Xcode: Version 12.2

Photo by William Warby on Unsplash

This one is written when completing one of the challenge project of 100 days of SwiftUI by hackingwithswift. (https://www.hackingwithswift.com/100/swiftui/19)
Challenge was to create a simple length measurement app from scratch. User will input a length and choose input unit [meters, kilometers, feet, yards, or miles]. He will then choose output unit. App should show the converted unit in Text view.

Simple as it sounds! 👼

I am not going to talk about UI here, only the logical part.


Photo by Clément H on Unsplash

When I started learning swift, first thing my mentor told me to follow best practices. And I never regret following his guidance.

So while doing one particular project which involved coordinator pattern, I came across one such problem. Not a huge problem, but a problem that matters. Specifying colour, images for views and cells. Question arises where to keep it and how easy it is to access.

Initially, I kept it in cell class since that colour and images was used only in that. But as project grew, things were repeated in so many cells and view controllers.

One such…

Hithakshi Kulal

iOS developer at Robosoft Technologies

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store