I declared a UIImage variable :
var s1:UIImage? = UIImage(named: "alphabet O")
I am assigning an another image in a method:
func setImage(){
if var img = s1{
img = UIImage(named: "alphabet X")!
}
}
The answer can be quite simple but truly I am very new in swift. Please help. Thanks