IPhone : does calling cancelPreviousPerformRequestsWithTarget: on a selector cancel internal method calls as well?

on Wednesday, April 1, 2015

I have a selector method which performs search for particular text in two different libraries in two different threads called using dispatch_async.


Now this selector is bound to a textfield and as soon some characters change we can query the libraries for the text.


Now a search takes some time say like 0.3 - 0.4 second and if the first search is not complete before another character is entered I woould like to cancel the search and re-start with new characters in the text field.


So does calling cancelPreviousPerformRequestsWithTarget on the selector cancel the internal threads and libraries call...?


0 comments:

Post a Comment