Within my application I am setting up some actions to allow users to create/edit/delete some options via webservices. While allowing to do this, I needed to implement a timer to stop the people from just repeatedly add, delete, add, delete….. When the user presses the button, I call a method like so [sender setBackgroundImage:img forState:UIControlStateNormal]. This appears to work just fine.
When my timer is invalidated after x seconds I am calling another method to restore the background image [changeAdminPinBtn setBackgroundImage:image forState:UI….]. image points to @”button.png” btw.
This above method is not changing my background image back. A property has been declared for the UIButton but cannot seem to find the way of changing the buttons backgroundImage to the image that I want.
The initial UI is wired up in IB and I’m trying to change the properties of these buttons programmatically.
Can someone help shed some light on the issue please?
I can think of few things to check:
changeAdminPinBtnset up and linked to IB correctly.setBackgroundImageanywhere else.