iOS中去除 Warning警告
生活随笔
收集整理的這篇文章主要介紹了
iOS中去除 Warning警告
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
過(guò)期方法的 warning 消除
#pragma clang diagnostic push #pragma clang diagnostic ignored "警告標(biāo)識(shí)的描述" // 例如 -Wdeprecated-declarations // 過(guò)期的方法 // #pragma clang diagnostic pop// for example #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations"return [self.text sizeWithFont:self.font constrainedToSize:CGSizeMake(CGFLOAT_MAX, height) lineBreakMode:self.lineBreakMode]; #pragma clang diagnostic pop//警告標(biāo)識(shí)的描述 的查找方法 step 1) find "show the issue navigator"step 2) find the issue step 3) reveal in log step 4) read message such as UILabel+Extension.m:48:27: warning: 'sizeWithFont:constrainedToSize:lineBreakMode:' is deprecated: first deprecated in iOS 7.0 - Use -boundingRectWithSize:options:attributes:context:[-Wdeprecated-declarations] // 描述標(biāo)識(shí) 復(fù)制代碼architecture x86_64
warning: no rule to process file 'README.md' of type net.daringfireball.markdown for architecture x86_64. 引用地址
we can resolve that things with simply following step:-Step 1) Select Project Navigator Step 2) Select your project Step 3) Select your targetStep 4) Select Build PhasesStep 5) Move files which we don't want the compiler to process from Compile Sources to Copy Bundle Resources復(fù)制代碼解決方式2
引用位置
Select the project target Select the Build Phases Expand the Compile Source Remove the Header file (Reachability.h) note : for removing the Reachability.h file from Compile Source, first select the file and then press the - buttonIf you need the header, then make sure that it is added to the "Headers" list below "Compile Sources".復(fù)制代碼總結(jié)
以上是生活随笔為你收集整理的iOS中去除 Warning警告的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: Server 2008 配置共享文件服务
- 下一篇: 列表的定义、索引、添加、删除、查找、排序