`

Suppressing deprecated warnings in Xcode

    博客分类:
  • ios
 
阅读更多

 

Since I yet can not add a comment to the @samiq post, I think I will expand it. Input mentioned directive before a function / method in which you use deprecated stuff. Then you can restore the previous setting after the definition of the function end:

#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
- (void) methodUsingDeprecatedStuff {
    //use deprecated stuff
}
#pragma GCC diagnostic warning "-Wdeprecated-declarations"
 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics