How to wait until a asynchronous function finish running then only run continue another function in swift?

user5892150

My problem is that , I have a function that i would like it to finish running all code before continue to another function . While running i hope that i can do other stuff like change view . I run my current fucntion and it is Asynchronous and it direct go to another function without running finish all the code if i run synchronous i can't change my view and all code wait for it i cant do anything at all .So i hope that someone can provide an answer to this. Asynchronous seems to skip and directly run another function which require the previous function .

Jobins John

From what you have shared i understand that you are calling an Asynchronous function and you need to do something only after the execution of the Asynchronous function. For this purpose you can use completion handlers.

You can get more information from the following links

Link 1

Link 2

Link 3

Hope this helps you...

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Wait until function finish to run another function

javascript function wait until another function to finish

How to wait for a jQuery toggle to finish before running another function?

How i can wait until the subscribe finish before return a value of another function

How can I wait for an external file function to finish then continue on main?

How do I wait for an asynchronous function to finish correctly (flutter, dart)

Wait till a Function with animations is finished until running another Function

How can I use a javascript promise to make one function wait for another to finish running asynchronously?

jQuery - to wait until function returns and then continue

How to pause an asynchronous Swift function until a callback is called when a result is available from another library(JavaScriptCore)

How to wait for command line activity to finish before calling another function?

How to not wait for function to finish python

How to wait for function to finish in javascript?

How to wait for main Thread until asynchronous methods will finish?

Wait for function to finish running before iterating

Swift synchronous function waiting for asynchronous functions to finish

How to wait until data from network call comes and only then return value of a function #Swift

Angular 5, rxjs- wait for observable to finish only if it is in a middle of a run before running another process

wait for ajax function to finish until reload the function again using interval

Forcing a function to wait until another function is complete

How to make function run, then wait for user input, then another function run?

Return then wait for another function to finish in python

Asynchronous javascript: How to run a function during the execution of another function

Is it possible to go to another page, wait until the user returns to the original page, then continue the function?

How to wait for GAS custom function to finish and then continue using google sheets api?

How to wait for asynchronous function to be executed?

How to not wait a function until it ends?

How to properly wait until function has finished doing in swift?

How a for loop should wait until a function inside it finish its execution in angularjs?