So I have an onclick event for a UIButton that needs to execute some code, but it can be pressed at anytime, so there is a chance that it is pressed while another method is still running. Is there a way to block the click event until the specific method is finished?
Share
Unless the “specific method” is running on another thread, that’s already what happens. The run loop can’t process input events while other code is running on the main thread.