my code is: func PickUpCarCost() {
imgCheck.image = UIImage(named: "uncheck.png")
imgUnCheck.image = UIImage(named: "uncheck.png")
if CarPickUpButton?.tag == 1 {
imgCheck.image = UIImage(named: "check.png")
self.pickupChargelabel.text=self.PickUpFare.text!
}
else {
imgUnCheck.image = UIImage(named: "uncheck.png")
}
}
in this i wants take bool like if button selectes image view image will be check.png if unselect image view image will be uncheck.png how to code for this in swift.