0 votes
11 views
What is fast enumeration in Objective-C?
in Technology by (190k points)

1 Answer

0 votes

The object is usually a collection such as an array or set Several Cocoa classes, including the collection classes, adopt the NSFastEnumeration protocol. You use it to retrieve elements held by an instance using a syntax similar to that of a standard C for loop, as illustrated in the following example:

NSArray *anArray = // get an array;

for (id element in anArray)

{

/* code that acts on the element */

}

by (190k points)

Related questions

0 votes
1 answer 13 views
13 views asked Nov 10, 2020 in Technology by JackTerrance (190k points)
0 votes
1 answer 10 views
10 views asked Nov 10, 2020 in Technology by JackTerrance (190k points)
0 votes
1 answer 9 views
9 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 15 views
15 views asked Nov 10, 2020 in Technology by JackTerrance (190k points)
0 votes
1 answer 12 views
12 views asked Nov 10, 2020 in Technology by JackTerrance (190k points)
0 votes
1 answer 10 views
10 views asked Nov 10, 2020 in Technology by JackTerrance (190k points)
0 votes
1 answer 13 views
13 views asked Nov 10, 2020 in Technology by JackTerrance (190k points)
0 votes
1 answer 15 views
15 views asked Nov 10, 2020 in Technology by JackTerrance (190k points)
0 votes
1 answer 12 views
12 views asked Nov 10, 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
11 views asked Nov 10, 2020 in Technology by JackTerrance (190k points)
0 votes
1 answer 13 views
0 votes
1 answer 16 views
16 views asked Nov 10, 2020 in Technology by JackTerrance (190k points)
0 votes
1 answer 19 views
19 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 10 views
0 votes
1 answer 9 views
9 views asked Nov 10, 2020 in Technology by JackTerrance (190k points)
...