问题
So the question is the subject question - I want to get rid of this warning which is pretty annoying.
Is there a way to make it silent?
Note: I use dispatch_get_current_queue() for debugging purposes only.
回答1:
You could use the following code to suppress the warnings.
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
dispatch_get_current_queue() // your deprecated calling code
#pragma clang diagnostic pop
来源:https://stackoverflow.com/questions/14065844/how-to-suppress-the-deprecation-warning-dispatch-get-current-queue-is-depreca