Category 命名冲突检测
来源:互联网 发布:美的面试 知乎 编辑:程序博客网 时间:2024/06/06 00:43
参考
https://developer.apple.com/library/ios/qa/qa1908/_index.html#//apple_ref/doc/uid/DTS40016829
You can use the OBJC_PRINT_REPLACED_METHODS
environment variable to enable extra debug logging that prints a message when methods are replaced by category implementations. When a category is loaded, a message similar to Listing 2 is printed for each method in the category that clashes with an existing method in the original class.
可以设置OBJC_PRINT_REPLACED_METHODS 环境变量来开启debug日志,开启后将会打印出某一方法何时被category实现方法替代了。当category被加载完成后,一条类似清单2展示的消息会被打印出来,这条消息表明了category中的哪一个方法与原始类中的方法名产生了冲突。
Log output when a method is replaced by a category implementation
objc[21184]: REPLACED: -[UIView isOccludedByView:] by category MyCategory (IMP was 0x1873728a0 (/System/Library/Frameworks
/UIKit.framework/UIKit), now 0x10002e700 (/var/mobile/Containers/Bundle/Application/14AFE8C4-EA96-4A51-8D40-F1DAD35CC3D8/<YourApplicationName>.app/<YourApplicationName>)
Important: You should ignore log messages that do not explicitly name your application or a custom framework it links against. Some system frameworks use categories to provide implementations of methods that are defined as stubs in the original class. This causes extra log messages to be emitted when running with the
OBJC_PRINT_REPLACED_METHODS
environment variable enabled and is expected behavior.重要提示:你应该忽略那些和你的程序、自定义框架无关的消息。一些系统库使用category来实现原始类中定义的某些方法。当设置OBJC_PRINT_REPLACED_METHODS环境变量为真得时候,请忽略因为上述原因产生的多余日志,因为这是正常行为
- Category 命名冲突检测
- 命名冲突
- Jquery的$命名冲突
- jQuery的$命名冲突
- Jquery的$命名冲突
- Jquery的$命名冲突:
- Jquery的$命名冲突
- JQuery的$命名冲突
- Jquery的$命名冲突
- jQuery$命名冲突解决方法
- Jquery的$命名冲突
- Jquery的$命名冲突:
- Jquery的$命名冲突:
- Jquery的$命名冲突
- Jquery的$命名冲突
- WebService命名空间冲突
- Jquery的$命名冲突
- 变量命名冲突
- leetcode:单链表之Reverse Linked List II
- js中 日期天数加1
- spring注解的详细说明
- POJ 3159 Candies
- openstack 工作流workflows使用原理讲解
- Category 命名冲突检测
- 网络编程学习笔记一:Socket编程
- hdu 5791 two 多校联赛第五场
- JVM基础知识
- 使用RecyclerView和Glide实现图片瀑布流(防止错位)
- android studio启动时关闭上次打开的项目
- POST 提交XML 文件
- 堆和堆排序
- java消息队列ActiveMQ的简单使用