Is there a way I can execute a block and not a selector that matches this and similar methods?
I have observers that can receive events that are not generated in the main thread. I want the action to be executed in the main thread if it focuses mainly on the user interface. Right now, I need to write two methods for this, where one is an observer of events, and the second is code that should be executed in the main thread.
I would like to encapsulate it all in one method, if I could.
source share