JAY站

Valar Morghulis Valar Dohaeris

静下心来,用心观察 处处都透着生活的美.


开发中 warning 的 解决方案

过期方法的 warning 消除

#pragma clang diagnostic push
#pragma clang diagnostic ignored "警告标识的描述"  // 例如 -Wdeprecated-declarations
//    过期的方法      //
#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

//警告标识的描述 的查找方法 
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] // 描述标识 

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

解决方式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 - button

If you need the header, then make sure that it is added to the "Headers" list below "Compile Sources".

最近的文章

项目 project 与 target 动态库 静态库的知识

本文是阅读笔记, 原文在 最下面项目 project 与 target 动态库 静态库的知识 project就是一个项目,或者说工程,一个project可以对应多个target targets之间完全没有关系。但target和project有关系,target的setting会从project settings中继承一部分 Copy Bundle Resources 是指生成的product的.app内将包含哪些资源文件 Compile Sources 是指将有...…

iOS继续阅读
更早的文章

网络协议与分层体系结构

它是计算机网络中不可缺少的组成部分,协议是指 通信双方必须遵守的控制信息交换的规则的集合,是一套语义与语法规则,用来规定有关功能部件在通信过程中的操作,它定义了数据发送和接收工作中必经的过程.协议规定了网络中使用的格式、定时方式、顺序和检错。1.协议三要素: 语法是指数据与控制信息的结构或格式,确定通信时采用的数据格式,编码及信号电平等回答“怎么讲” 语义 协议的语义是指对构成协议的协议元素含义的解释“讲什么” 同步 规定了事件的执行顺序2. 网络体系结构的定义网络体系结构 ...…

网络继续阅读