0

I wanted to identify each of the NSInvocationOperation to identify what this operation in the isFinished in the KVO notification.

So I am planning to not to maintain the NSInvocationOperation as an iVAr in my VC. But when I get KVO notification, I wanted to be able to identify the NSInvocationOperation. So I am planning to add a tag (by subclassing the NSInvocationOperation) which can store values with which I can use to identify the operation.

Is this a good way to identify the object? Is there any alternatives?

RK-
  • 12,099
  • 23
  • 89
  • 155

1 Answers1

1

You could try using Associative References in a category. It would remove the need to rewrite existing code to use your subclass.

I've been using it in a similar case, works just fine!

Toastor
  • 8,980
  • 4
  • 50
  • 82