iOS常用的忽略警告類型:
1.方法棄用警告
#pragmaclang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
//過(guò)期的方法
#pragma clang diagnostic pop
2.不兼容指針類型警告
#pragmaclang diagnostic push
#pragmaclang diagnostic ignored? "-Wincompatible-pointer-types"
//不兼容指針類型
#pragmaclang diagnostic pop
3.循環(huán)引用警告
#pragmaclang diagnostic push
#pragmaclang diagnostic ignored"-Warc-retain-cycles"
//循環(huán)引用
#pragmaclang diagnostic pop
4.未使用變量警告
#pragmaclang diagnostic push
#pragmaclang diagnostic ignored? "-Wunused-variable"
//未使用的變量
#pragmaclang diagnostic pop
5.內(nèi)存泄漏警告
#pragmaclang diagnostic push
#pragmaclang diagnostic ignored? "-Warc-performSelector-leaks"
//內(nèi)存泄漏警告
#pragmaclang diagnostic pop