I've got this function that cycles through arrays and changes 2 labels. How can I make it so the UILabels come from the right and leave to the left?
func updateLabels() {
self.myTimer = Timer.scheduledTimer(withTimeInterval: 2, repeats: true) { (t) in
self.titleLabel.text = self.titleArray[self.counter]
self.textLabel.text = self.textArray[self.counter]
self.counter += 1
if self.counter == self.titleArray.count && self.counter == self.textArray.count {
self.counter = 0
}
}
}