ios - Is it possible to block execution of my code until UIAlertController is dismissed? -


is there anyway wait user press button dismiss alertcontroller in swift 3, using dispatchqueue or else?

you mean this?

alertcontroller.displayandwaituntildismissed() // line reached after alert controller dismissed print("alert controller dismissed.") 

theoretically, yes, use dispatch semaphore block until alert dismissed. it’s bad idea – can’t think of scenario acceptable. accept have deal asynchronously, executing desired code in alert controller action.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -