In the application, I use the days of the week to open the achievements.
let date = Date()
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "EEEE"
let dayInWeek = dateFormatter.string(from: date)
if dayInWeek == "Monday" {
achiv = true
}
I use English, Russian and Ukrainian languages in the application. The problem is that this condition is valid if the phone is in English language. Help pass this method so that the conditions work regardless of the language on the device.
Aucun commentaire:
Enregistrer un commentaire