ios - What is the caret symbol (^) and where is it defined? -


this question has answer here:

i saw following code:

[uiview animatewithduration:5.0 animations:^ {     iv.alpha = 1.0;//iv uiimageview }]; 

supposedly ^ defines function block or something. similar delegate? part of c/c++ or objective-c? cannot option+click symbol go in documentation.

the caret symbol creates block, similar delegate. it's type of closure—a function defined inline has access variables in parent scope, can used simplify types of delegate-/callback-oriented code.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

c# - How do I get the Nth largest element from a list with duplicates, using LINQ? -

jsp - "Sending a redirect is forbidden after the response has been committed" in sendRedirect -