I am using the following code to compare two strings and show a different image depending on the comparison:
let sameQuotation = "0"
if prioridad == sameQuotation {
print("es 0-")
let image11 = UIImage(named: "pri0") as UIImage?
}
let sameQuotation1 = "1"
if prioridad == sameQuotation1 {
print("es 1-")
let image11 = UIImage(named: "pri1") as UIImage?
}
The "print" action is done perfectly, but the image doesn't change.
I am new to Swift and may be there is something wrong with my code.
Thank you.