Blocks are language-level feature that added to C, Objective-C and C++, which provides you to create distinct segments of code that can be passed to methods or functions as if they were values. Blocks are Objective-C objects, so we can add it to collections like NSArray or NSDictionary. Blocks can capture values from the enclosing scope,so this features make blocks similar to closures or lambdas in other programming languages such as java and c#.
Liked By
Write Answer
What is block in objective c?
Join MindStick Community
You have need login or register for voting of answers or question.
Allen Scott
09-Jan-2017Blocks are language-level feature that added to C, Objective-C and C++, which provides you to create distinct segments of code that can be passed to methods or functions as if they were values. Blocks are Objective-C objects, so we can add it to collections like NSArray or NSDictionary. Blocks can capture values from the enclosing scope,so this features make blocks similar to closures or lambdas in other programming languages such as java and c#.