iOS常用的忽略警告类型:
1.方法弃用警告
#pragmaclang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
//过期的方法
#pragma clang diagnostic pop
2.不兼容指针类型警告
#pragmaclang diagnostic push
#pragmaclang diagnostic ignored "-Wincompatible-pointer-types"
//不兼容指针类型
#pragmaclang diagnostic pop
3.循环引用警告
#pragmaclang diagnostic push
#pragmaclang diagnostic ignored"-Warc-retain-cycles"
//循环引用
#pragmaclang diagnostic pop
4.未使用变量警告
#pragmaclang diagnostic push
#pragmaclang diagnostic ignored "-Wunused-variable"
//未使用的变量
#pragmaclang diagnostic pop
5.内存泄漏警告
#pragmaclang diagnostic push
#pragmaclang diagnostic ignored "-Warc-performSelector-leaks"
//内存泄漏警告
#pragmaclang diagnostic pop