Is it possible to subtract the values in one NSMutableArray from those in another NSMutableArray, while preserving any remaining like values (keep duplicate copies)? I don’t want to remove every instance of the value, just a 1 for 1 subtraction.
I’m working with CGPoints.
Array1
ccp(1,1)
ccp(1,1)
ccp(1,2)
ccp(1,3)
Array2
ccp(1,1)
Desired output: Array3
ccp(1,1)
ccp(1,2)
ccp(1,3)
Sorry I didn’t understand your question properly before. Maybe you could try something like:
Update
NSNotFoundis defined inNSObjCRuntime.h. You can find this out by command + clicking on the symbolNSNotFoundin Xcode.The definition is
The reason I knew to use this is by looking at the NSArray documentation for the
indexOfObject:method, which reads: