swift - How can I implement the same code without using didSet? -


i have implemented code setting images of button implement checkbox using didset function.

but don't want use didset function.

please suggest me other way implement same code without using didset.

//changing image using didset                didset  {   if (self.ischecked == true)   {       self.setimage(checked, forstate: .normal)   }   else   {       self.setimage(unchecked, forstate: .normal)   } } 

you can use uiswitch custom images set in storyboard, read value


Comments