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

php - Creating canonical URLs with custom route-classes -

mysql - Formatting problem with PHP DateTime Difference when used as part of an equation -

Mysql Local server hardware -