xcode4 - If you define an Objective C block within a block within a function, what scope does the inner block have access to? -


If a function defines a block within a block, then

Internal Blocking

In addition, do you have to do this to prevent self from continuing (the debate is preoccupied properly): < Pre> - (zero) function {__block id me = self; ^ {__bloc id me2 = me; ^ {[M2 ...]; ^}}}

I have blocks of the form

  - (zero) function {__block bool isOK = true; // ... [someArray enumerateObjectsWithBlock: ^ (id obj, bool ** stop) {// ... [someOtherArray enumerateObjectsWithBlock: ^ (id obj, bool ** stopping) {// ... isOK = false; }]; }]; }   

Then the internal block has reached the scope of the outer block.

Why do you want to stop keeping yourself? The object must be filled in any way for the lifetime of the block.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -