打开Voice Over时,CATextLayer的string对象兼容NSString和NSAttributedString导致的Crash(二解决思路1)

二、解决思路:

利用Xcode符号断点。
crash堆栈里面有一个很明显的信息,即-[NSObject(NSObject) doesNotRecognizeSelector:],所以

然后开着voice over,编译真机运行Qzone,然后程序走到这里停了:



=============================================================
这里插入一点Runtime的背景:
向作一oc对象发送一条message都会被转化为 objc_msgSend ,这个函数的函数原型:

id objc_msgSend(id self, SEL _cmd,...);

第一个参数obj,第二个selector,第三个即selector的第一个参数,依此类推。

按arm寄存器使用约定:
(可以Google搜索 Procedure Call Standard for the ARM® Architecture.pdf 或下载:
Procedure Call Standard for the ARM® Architecture
Procedure Call Standard for the ARM 64-bit Architecture (AArch64)





=============================================================


posted on 2015-09-19 21:20  封起De日子  阅读(98)  评论(0编辑  收藏  举报

导航