0

I started using this type of call back in my programs but i don't know what they are actually called. I set an instance variable of my class to var callback:()->Void and then in my view i just add an action to a button that calls the callback. Which allows me to set its functionality in the class i am adding the view to. But what is it called? I want to be able to look up the other options i have with using this type of callback?

So im trying to look for ways i can modify the return value and see if there are any other hidden secrets related to callbacks that i dont know of yet.

Esko918
  • 1,397
  • 1
  • 12
  • 25

1 Answers1

0

Call back function is useful when you pass data to the previous viewController or in Asynchronous function.

You can also refer following links

Apple Doc

Pass optional block or closure to a function in Swift

anshul king
  • 558
  • 4
  • 17