Open RichAppz opened 2 years ago
Get used to not hard coding strings in the code, same as colours and other constant files you have. Create string files:
extension String { static let goodMorning: String = "Good Morning" static let goodAfternoon: String = "Good Afternoon" static let goodEvening: String = "Good Evening" } switch hour { case 0..<12 : timeOfTheDay = . goodMorning case 12..<18 : timeOfTheDay = . goodAfternoon case 18..<24 : timeOfTheDay = . goodEvening default: print("DEBUG: Hi") }
Done
Get used to not hard coding strings in the code, same as colours and other constant files you have. Create string files: