博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Remove the warning...(Now XCode is 4.6)
阅读量:7006 次
发布时间:2019-06-27

本文共 1833 字,大约阅读时间需要 6 分钟。

hot3.png

(1) Warning: "used as the previous parameter rather than as part the selector"

Sometimes,we write method using Objective-C.For example: - (void) setRGB: (CGFloat) r : (CGFloat) g :  (CGFloat) b;

The correct way to write the method using Objective-C is like this:

- (void) setRGBrValue: (CGFloat) r : gValue (CGFloat) g : bValue:  (CGFloat) b;

When we using the old way to do,the Xcode(Version 4.6) will give the warning.We can add a line follow:

#pragma clang diagnostic ignored "-Wmissing-selector-name"
You can put this line to the .pch file,like this all the file can remove the warning.

reference link:http://stackoverflow.com/questions/14579197/how-to-disable-new-xcode-4-6-warning-for-whole-project-used-as-the-name-of

(2) If you want to output the address of an Object,you can using "%p",this format can output the object's memory address,if you using the other way,like "%8X" etc,the Xcode (version 4.6) will give the warning.

reference link:http://stackoverflow.com/questions/7555143/nslog-an-objects-memory-address-in-overridden-description-method

http://www.cocoachina.com/bbs/read.php?tid=134596

                                                                                                -----2013/02/26

(3) When you caught a issue that the "The file "XXXX-XXXX-XXX..." couldn't be opened because there is no such file",you will can not see any error in the console,so how to fix this issue?

the way is to "Clean" your project,then you run the app,and your app will stop in the correct location causing this crash issue.

(4) How to make your app stop in the correct location caused crash bug?

Please do like this:

- Please show the Breakpoint navigator;

- click the tiny button in the right-left of Xcode;

- click "Add Exception Breakpoint";

- click "Done".

Then your app will stop in the right location when it occur a bug.

                                                                                                -----2013/05/24 Portland OR US

Continue...

转载于:https://my.oschina.net/u/913344/blog/110330

你可能感兴趣的文章
DOM事件
查看>>
检测AudioRecord是否被第三方管理应用禁用(附demo)
查看>>
阿里P8架构师谈:如何搭建亿级并发系统的性能指标体系
查看>>
关于webpack优化,你需要知道的事(上篇)
查看>>
深入浅出Java并发核心
查看>>
springmvc+mybatis +Jeesz 分布式架构
查看>>
深入剖析 Java7 中的 HashMap 和 ConcurrentHashMap
查看>>
打造腾讯营销数据闭环,MTA联手腾讯广告平台
查看>>
Tomcat中用JNDI方式加载JDBC DataSource以连接数据库
查看>>
android解析HashMap格式的json
查看>>
AFNetworking 源码分析(一)
查看>>
深入理解channel:设计+源码
查看>>
【Android】RxJava的使用(一)基本用法
查看>>
React Fiber 原理介绍
查看>>
断路器HystrixCircuitBreaker
查看>>
前端爬坑之旅--echarts渲染时canvas变为100px
查看>>
CODING 最佳实践:快课网研发效能提升之路
查看>>
实现一个平行四边形
查看>>
基于http协议使用protobuf进行前后端交互
查看>>
elasticsearch v6.5.4配置
查看>>