单个文件的警告
1、在源文件中修改
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshorten-64-to-32" // 警告的类型
// 产生警告的代码
#pragma clang diagnostic pop
2、在Build Phases中

3、怎么获取警告类型

4、警告类型的转化 警告类型前面的w是前缀,在Build Setting 和 单独文件编译中变成-Wno-
全局的警告
在Build Setting中搜索Other Warning Flags,加上忽略的类型

第三方库的警告
在Podfile中加上inhibit_all_warnings!

文档警告
在Build Setting 中 搜索 Documentation Comments 设置为NO
