Blocks are Apple’s implementation of closures for C, which are also available for Objective-C and C++.
Let's say I need to communicate with a class that provides a protocol and calls delegate methods when an operation …
objective-c cocoa objective-c-blocksI read Apple documentation on how to Use serial queues to ensure that tasks to execute in a predictable order …
ios objective-c-blocks grand-central-dispatchI am using block based enumeration similar to the following code: [[[rows objectForKey:self.company.coaTypeCode] objectForKey:statementType] enumerateObjectsWithOptions:NSEnumerationConcurrent …
objective-c ios nsmutablearray objective-c-blocks nsmutabledictionaryI'm using Grand Central Dispatch (GCD) in my application to do some heavy lifting. The application is using Core-Data for …
iphone core-data objective-c-blocks grand-central-dispatchIs it possible to run a completion block on the main thread? For example, I have one method which returns …
iphone ios objective-c-blocks grand-central-dispatchI started using blocks a lot and soon noticed that nil blocks cause bus errors: typedef void (^SimpleBlock)(void); SimpleBlock …
objective-c objective-c-blocksI have a modal view controller that I called in from another view controller. Upon dismissal of the modal view …
ios objective-c-blocks modalviewcontroller presentmodalviewcontrollerI'm trying to understand blocks. I get how to use them normally, when passed directly to a method. I'm interested …
objective-c cocoa objective-c-blocksI am getting confused with use of self inside blocks, I go through some of Apple's documents but still cannot …
cocoa-touch cocoa objective-c-blocksI've just stumbled over the following SO topic: Why should we copy blocks rather than retain? which has the following …
objective-c automatic-ref-counting objective-c-blocks