I have 2 Buttons in my View, An event must swap between the selectorof each one
in other words (Not a Code):
button1 selector = button2 selector;
button2 selector = button1 selector;
EDIT:
the event is what ever it is, but the code responsible of swap between the 2 buttons Actions is what i need
what i need is:
1-how to remove a selector and store it to use it for the other button
2-how to use a saved selector as a button selector
PS
in my code button1 and button2 have a random selectors from 9 selectors based on the user selection before entering the view containing my two buttons
This assumes you only have a single action associated with each button’s target (presumed to be
self).There are ways around so much duplicated code but I felt this way was much more readable. Finally, this solution truly swaps actions based on the run time situation rather than rely on assigning specific actions at compile time, which should meet your updated requirement. Hope this helps!