I think this is a very basic question about the C language on which Objective-C is based. You aren't familiar with pointers?
stop
is a parameter of the block. Its type is BOOL*
which means "a pointer to BOOL".
Somewhere within the implementation of -enumerateKeysAndObjectsUsingBlock:
is code which calls the block you supllied. That code has created storage for a BOOL
value. It is passing the pointer to (a.k.a. address of) that storage to your block so that your block may, by writing through the pointer, modify the value at that storage location.
The statement *stop = YES;
assigns the value YES
to the BOOL
pointed to by the stop
variable. That's what I meant above by "writing through the pointer". In this way, the block has modified a variable of the caller's, which is how the caller knows that the block wants the enumeration to stop.