Ask Your Question

What are the blocks? How will you use them?

What are the blocks? How will you use them?

Blocks are language-level features that are added to Objective C, C, and C++. Blocks allow you to create segments of code that can be passed to methods or functions as values. Syntax to define a block uses the caret symbol (^):^{
NSLog(@”This is a block”);
}