iOS Developer Question:

Download Job Interview Questions and Answers PDF

What is block in objective c?

iOS Developer Interview Question
iOS Developer Interview Question

Answer:

Blocks are a language-level feature added to C, Objective-C and C++, which allow you to create distinct segments of code that can be passed around to methods or functions as if they were values. Blocks are Objective-C objects, which means they can be added to collections like NSArray or NSDictionary. They also have the ability to capture values from the enclosing scope, making them similar to closures or lambdas in other programming languages.

Download iOS Developer Interview Questions And Answers PDF

Previous QuestionNext Question
What is difference between "protocol" and "delegate"?Explain me what is ARC? How it works?