Top "Objective-c-blocks" questions

Blocks are Apple’s implementation of closures for C, which are also available for Objective-C and C++.

How do you trigger a block after a delay, like -performSelector:withObject:afterDelay:?

Is there a way to call a block with a primitive parameter after a delay, like using performSelector:withObject:afterDelay: …

ios objective-c grand-central-dispatch objective-c-blocks
Assign a variable inside a Block to a variable outside a Block

I'm getting an error Variable is not assignable (missing __block type specifier) on the line aPerson = participant;. How can I …

objective-c compiler-errors objective-c-blocks
Waiting until two async blocks are executed before starting another block

When using GCD, we want to wait until two async blocks are executed and done before moving on to the …

ios objective-c objective-c-blocks grand-central-dispatch
Can I use Objective-C blocks as properties?

Is it possible to have blocks as properties using the standard property syntax? Are there any changes for ARC?

ios objective-c automatic-ref-counting objective-c-blocks
What does the "__block" keyword mean?

What exactly does the __block keyword in Objective-C mean? I know it allows you to modify variables within blocks, but …

objective-c ios objective-c-blocks
Store a closure as a variable in Swift

In Objective-C, you can define a block's input and output, store one of those blocks that's passed in to a …

swift closures objective-c-blocks
Objective-C pass block as parameter

How can I pass a Block to a Function/Method? I tried - (void)someFunc:(__Block)someBlock with no avail. …

objective-c objective-c-blocks
Declare a block method parameter without using a typedef

Is it possible to specify a method block parameter in Objective-C without using a typedef? It must be, like function …

objective-c parameters objective-c-blocks
Block Declaration Syntax List

Block syntax in Objective C (and indeed C, I presume) is notoriously incongruous. Passing blocks as arguments looks different than …

objective-c syntax objective-c-blocks
How do I avoid capturing self in blocks when implementing an API?

I have a working app and I'm working on converting it to ARC in Xcode 4.2. One of the pre-check warnings …

objective-c ios objective-c-blocks automatic-ref-counting