Help is needed. I need to make it so that 2 times a day (every 12 hours) the String in the UITextView, which I take from the finished array, changes to the next String in the array. Using Date or the Calendar function, I'm stuck. Offer your options, thanks in advance!
@IBOutlet var ThisTextView: UITextView! var array = ["a","b","c","d"] var lastDate: Date? var currentDate = Date() override func viewDidLoad() { super.viewDidLoad() if currentDate == lastDate { // Мы ничего не делаем } else { // Мы меняем string на следующий в массиве используя какую-то функцию/метод здесь или не здесь, как удобно. }