Tag: objective-c-blocks

704 How do you trigger a block after a delay, like -performSelector:withObject:afterDelay:? 2010-11-09T22:13:44.557

409 What does the "__block" keyword mean? 2011-08-16T15:39:53.320

360 Assign a variable inside a Block to a variable outside a Block 2011-11-01T05:16:56.300

306 Can I use Objective-C blocks as properties? 2010-10-14T16:55:34.930

274 Block Declaration Syntax List 2012-02-08T21:13:48.487

217 How do I avoid capturing self in blocks when implementing an API? 2011-10-21T18:49:40.057

174 Waiting until two async blocks are executed before starting another block 2012-08-10T21:40:03.613

164 Retain cycle on `self` with blocks 2010-12-04T07:55:40.010

149 When to use enumerateObjectsUsingBlock vs. for 2010-12-20T03:19:33.290

140 Declare a block method parameter without using a typedef 2011-03-30T13:29:37.867

131 Objective-C pass block as parameter 2011-10-29T02:17:11.987

110 Store a closure as a variable in Swift 2014-07-07T05:28:56.140

95 Alternatives to dispatch_get_current_queue() for completion blocks in iOS 6? 2012-11-05T17:39:39.983

86 Blocks instead of performSelector:withObject:afterDelay: 2010-10-24T03:20:37.430

74 How to store blocks in properties in Objective-C? 2010-11-02T20:32:25.210

72 Calling [self methodName] from inside a block? 2011-02-16T23:42:10.183

72 What is the difference between a __weak and a __block reference? 2012-08-02T08:02:58.327

72 Custom completion block for my own method 2013-05-01T18:30:14.747

70 Why do nil / NULL blocks cause bus errors when run? 2010-11-10T13:52:59.850

69 Implementing a method taking a block to use as callback 2011-08-24T18:40:00.353

63 Which is the right one, nil or NULL, to mark "no Objective-C block"? 2011-04-23T18:52:16.540

59 UIButton block equivalent to addTarget:action:forControlEvents: method? 2010-10-11T16:16:31.057

59 How to dispatch on main queue synchronously without a deadlock? 2012-04-26T09:28:29.767

52 dispatch_sync vs. dispatch_async on main queue 2011-06-30T17:31:24.587

52 Why can't we use a dispatch_sync on the current queue? 2012-06-11T17:25:08.090

49 Unable to access global variables in dispatch_async : "Variable is not Assignable (missing _block type specifier)" 2012-07-05T04:49:24.907

47 Storing Blocks in an Array 2011-11-03T15:38:43.923

47 How to cancel NSBlockOperation 2011-11-13T17:20:15.577

45 Can AFNetworking return data synchronously (inside a block)? 2011-11-01T16:49:39.117

45 Using weak self in dispatch_async function 2014-02-24T11:55:27.283

44 Block references as instance vars in Objective-C 2010-07-12T16:30:08.753

43 Is it necessary to use weak references to self always inside blocks..? 2012-11-02T11:45:18.883

42 How does typedef-ing a block works 2013-03-09T12:52:28.450

40 iOS blocks and strong/weak references to self 2013-09-26T02:42:19.877

40 Difference between block (Objective C) and closure (Swift) in ios 2014-10-15T05:00:32.003

39 Objective-C: `continue` in collection enumeration block? 2012-11-09T06:47:55.207

38 How can I verify that I am running on a given GCD queue without using dispatch_get_current_queue()? 2012-10-09T18:50:50.847

37 Better asynchronous control flow with Objective-C blocks 2012-06-06T14:09:36.643

37 Is the weakSelf/strongSelf dance really necessary when referencing self inside a non-retained completion called from a UIViewController? 2014-01-14T12:48:42.770

36 Executing Blocks From NSArray? 2010-07-15T16:54:35.090

35 How to write an Objective-C Completion Block 2014-01-29T16:26:44.867

34 Generic typeof for weak self references 2012-06-05T06:03:29.493

33 How to simplify callback logic with a Block? 2011-01-28T01:49:21.637

33 Alternative syntax to __block? 2013-06-07T16:25:26.107

33 Block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior 2014-02-05T12:45:37.007

32 Objective-C callback handler 2011-12-05T23:00:30.863

30 Why should I choose GCD over NSOperation and blocks for high-level applications? 2011-10-04T17:11:05.603

29 Objective-C Block Property with Xcode code completion 2012-02-02T23:15:47.563

27 Correct management of addObserverForName:object:queue:usingBlock: 2010-12-29T01:09:05.600

26 Objective C — What is the fastest and most efficient way to enumerate an array? 2011-06-01T01:19:52.870

26 ARC, ivars in Blocks and Reference Cycles via Captured Self 2011-11-04T15:19:47.567

26 Checking Objective-C block type? 2012-01-28T20:24:35.063

25 Is there an easy way to autocomplete block variables in xcode? 2012-05-04T19:51:18.560

25 What is the purpose of using blocks 2012-08-29T11:33:22.500

25 FIFO serial queue using GCD 2013-01-02T20:34:13.630

25 Using __block and __weak 2013-10-07T14:51:17.670

24 Objective-C crash on __destroy_helper_block_ 2014-05-09T20:07:30.040

23 avoiding "expression result unused" warning in a block 2012-01-21T12:28:28.793

23 Possible to pass [self anyFunction] in blocks without __weak object (iOS 5 + ARC) 2012-01-25T13:36:32.337

22 Grand Central Dispatch (GCD) with CoreData 2010-11-24T07:55:02.770

22 Having trouble with BOOL return type in Objective-C blocks 2011-05-09T08:26:08.580

22 How can I retrieve a return value from a completion block? 2011-12-08T14:01:50.267

21 using completion with animateWithDuration causes exc_bad_access 2011-05-11T00:06:18.060

21 Reloading a UICollectionView using reloadData method returns immediately before reloading data 2013-08-14T11:48:36.850

20 Under ARC, are Blocks automatically copied when assigned to an ivar directly? 2012-05-04T17:11:36.253

20 Recursive Block Retain Cycles 2012-10-26T16:13:34.383

20 Have you noticed that dispatch_after runs ~10% too slow on iOS devices? 2014-01-21T18:15:53.503

19 Creating an IMP from an Objective-C block 2009-11-26T20:47:01.710

19 Copying blocks (ie: copying them to instance variables) in Objective-C 2010-04-17T16:19:43.360

19 iOS 4 blocks and retain counts 2011-04-02T20:09:51.160

19 Make iOS blocks execute synchronously 2011-07-07T06:38:19.380

19 Objective C - How to implement custom callback method but enforce specific parameter? 2012-03-28T08:12:57.607

19 Selectors or Blocks for callbacks in an Objective-C library 2012-06-13T21:06:20.213

19 Capturing 'self' strongly in this block is likely to lead to a retain cycle 2013-06-09T13:14:21.777

19 What will happen if I have nested dispatch_async calls? 2013-08-15T21:19:40.557

19 What is the property block declaration equivalent in swift of the following block property? 2014-06-30T16:56:22.903

18 Is it possible to compare two Objective-C blocks by content? 2010-01-30T13:04:26.450

18 Is there a SELF pointer for blocks? 2011-01-28T03:37:24.553

18 How to implement an NSRunLoop inside an NSOperation 2012-09-05T15:45:23.453

18 How does a completion handler work on iOS? 2013-08-17T17:13:52.770

18 recursive block and retain cycles in ARC 2013-11-09T23:23:31.103

18 Should I still copy/Block_copy the blocks under ARC? 2014-04-28T07:20:34.617

17 Encoding an Objective-c Block? 2010-01-31T18:20:41.050

17 How can code inside an Objective-C block reference the block object itself? 2011-03-05T02:38:33.557

17 Access C Array within blocks (variable array count) Objective-C 2011-03-28T06:55:31.613

17 Block_release deallocating UI objects on a background thread 2011-06-15T05:34:43.797

17 How do I create an objective-c method that return a block 2012-11-02T10:44:00.643

17 Is it ever Ok to have a 'strong' reference for a delegate? 2013-06-27T16:31:08.747

17 Simple GCD Serial Queue example like FIFO using blocks 2013-07-02T09:01:39.653

17 How to use "enumerateChildNodesWithName" with Swift in SpriteKit? 2014-06-13T20:31:52.273

16 Should a block literal retain referenced heap-allocated blocks 2011-03-26T23:43:14.997

16 iPhone : Unable to understand the following coding 2011-05-10T09:47:44.100

16 Pass a block to a C++ method from objective C 2011-05-16T07:18:37.570

16 EXC_BAD_ACCESS when copying or retaining Block 2011-08-18T17:26:31.090

16 ObjectiveC blocks Java equivalent 2012-04-03T14:45:19.800

16 Block recursion and breaking retain cycle 2013-02-12T18:46:25.203

16 iOS autorelease pool blocks 2013-04-24T17:28:25.040

16 Cocoa blocks as strong pointers vs copy 2014-11-26T15:12:24.993

15 Compactly disable arc-retain-cycles warning for self-referencing blocks 2011-11-24T01:11:13.403