Im new to swift, and Im trying to create a diffuse transition when a UITextField changes text from one to another. Here is snippet of my code.
if !isEmail{
UIView.transition(with: self.emailTextField,
duration: 0.5,
options: .curveLinear ,
animations: {
self.secondPasswordLabel.text = "Please enter a valid Email format"
},
completion: {_ in
DispatchQueue.main.asyncAfter(deadline: .now() + 1, execute: {
UIView.transition(with: self.emailTextField,
duration: 0.25 ,
options: .curveLinear,
animations: {
self.secondPasswordLabel.text = "No problem, enter your email used to register, and a link will be sent to you"
},
completion: nil)
})
})
}