I have a UITextView that I need to change for the next "String" in my array every day for 2 times(every 12 hours). I have some array here that I need to use with Date and UITextView. How I need to use Calendar? My simple question is "what I need to do?"
@IBOutlet var ThisTextView: UITextView!
var array = ["a","b","c","d"]
var lastDate: Date?
var currentDate = Date()
override func viewDidLoad() {
super.viewDidLoad()
if currentDate == lastDate {
// we do nothing
} else {
// we change string to the next in array using some function
// or we write this function here
}