How to suppress the deprecation warning “dispatch_get_current_queue() is deprecated…in iOS 6.0”?

霸气de小男生 提交于 2020-02-26 08:14:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!