美文网首页
Xcode去除警告⚠️

Xcode去除警告⚠️

作者: 程序员不务正业 | 来源:发表于2019-07-18 15:41 被阅读0次

部分无法处理的警告使用以下代码引起警告的代码处理

#pragma clang diagnostic push
#pragma clang diagnostic ignored "警告的类型"
xxxxx这是引起警告的代码
#pragma clang diagnostic pop

举例子

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
    button.font = [UIFont systemFontOfSize:30];
#pragma clang diagnostic pop

查找警告类型


image.png image.png

相关文章

网友评论

      本文标题:Xcode去除警告⚠️

      本文链接:https://www.haomeiwen.com/subject/yfmllctx.html