0 votes
10 views

What are blocks and how are they used?

in Technology by (190k points)

1 Answer

0 votes

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.

The syntax to define a block literal uses the caret symbol (^), like this:

^{

NSLog(@”This is a block”);

}

by (190k points)

Related questions

0 votes
1 answer 18 views
18 views asked Dec 7, 2020 in Technology by JackTerrance (190k points)
0 votes
1 answer 14 views
0 votes
1 answer 14 views
0 votes
1 answer 11 views
0 votes
1 answer 14 views
0 votes
1 answer 14 views
0 votes
1 answer 11 views
11 views asked Nov 10, 2020 in Technology by JackTerrance (190k points)
0 votes
1 answer 10 views
0 votes
1 answer 12 views
12 views asked Nov 10, 2020 in Technology by JackTerrance (190k points)
0 votes
1 answer 12 views
0 votes
1 answer 11 views
11 views asked Dec 6, 2020 in Technology by JackTerrance (190k points)
0 votes
1 answer 12 views
0 votes
1 answer 13 views
0 votes
1 answer 14 views
14 views asked Nov 10, 2020 in Technology by JackTerrance (190k points)
0 votes
1 answer 16 views
16 views asked Nov 10, 2020 in Technology by JackTerrance (190k points)
0 votes
1 answer 14 views
0 votes
1 answer 19 views
19 views asked Nov 10, 2020 in Technology by JackTerrance (190k points)
0 votes
1 answer 11 views
11 views asked Nov 10, 2020 in Technology by JackTerrance (190k points)
...