I have changed button title of a UIButton programmatically. I have also assigned an action to changed button title. Now when i tap on the button, it triggers both the action (one with same button title and one with changed). However, i want to trigger only one action for the changed title button.
How can i do it? Any help would be appreciated.
Two solutions. Toggle the target/action between methods or decide what to do based on some state.
1.
2a.
2b.