1

I have a view controller, which calls several async network ops (I am using AFNetworking), and handles the response using blocks. Consistently - one of the blocks shows me that self == nil, but other blocks in the SAME view controller, using the same underlying AFNetworking client, show me that self != nil and behave as expected.

Why does this particular block gives me a nil self reference? Am I doing anything wrong? I tried googling for this symptom, in vain.

My View controller is compiled with ARC, testing on iOS 6.1 simulator...

Sagi Mann
  • 2,967
  • 6
  • 39
  • 72

1 Answers1

1

Instead of accessing self directly, you should access it indirectly, from a reference that will not be retained. for more..

Community
  • 1
  • 1
tutsorg
  • 21
  • 2