Direct access to objective-c's isa is deprecated...
来源:互联网 发布:手机编程输入软件 编辑:程序博客网 时间:2024/06/06 16:46
installed Xcode 4.6 and now facing with new errors in an ancient code I manage.
the compiler now complains about "Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()" and won't build
ccessing isa
has been deprecated for some time, the tools just didn't tell you this. Notably, it's been deprecated for at least as long as tagged pointers have existed in obj-c.
And yes, object_setClass()
is the appropriate replacement.
That said, why do you even need this? It's extremely rare that replacing the class of an object is appropriate, and the only valid case I can think of is when you're trying to dynamically subclass a class in order to inject new behavior into individual instances without modifying the class as a whole (which is, of course, something you probably don't need to do).
http://stackoverflow.com/questions/14590637/replacing-self-isa-because-of-xcode-4-6-deprecation
- Direct access to objective-c's isa is deprecated...
- 解决老项目direct access to Objective-C's isa is deprecated in favor of object_getClass()
- xcode中 isa is deprecated
- Direct access to component
- c direct parameter access
- Direct access to Nova metadata
- Objective-C中的meta-class isa
- Objective-C 面向对象(isa)
- Objective-C isa 指针 与 runtime 机制
- Objective-C中的 id, isa,和 instancetype
- Objective-C isa 指针 与 runtime 机制
- Objective-C isa 指针 与 runtime 机制
- IOS4 and direct access to the camera
- 工程中使用 JSONkit 出现'isa' is deprecated错误的解决办法
- Access to the path : C:/test/configtest.xml is denied.
- 出现Access to the path : C:/... is denied 的解决方法
- Objective-C之Meta-class和isa指针
- 详解Objective-C的isa与meta-class
- 如何成为强大的程序员?
- java解析xls
- C++ static成员变量与static成员函数
- 网页的<title> 部分与后台数据库绑定
- hibernate主键生成策略全览
- Direct access to objective-c's isa is deprecated...
- NumPy学习笔记--入门篇
- device_init_wakeup()
- .net 与ios 消息推送----编写push notification之获取device token
- 优化反射性能的总结(上)
- ASP.NET MVC4 中整合 NHibernate3.3、Spring.NET2.0、ExtJS4 笔记二:开发环境搭建
- Vs 2008 解决方案的目录结构设置和管理
- Django Interactive Console Debug
- 二分图的最大匹配