博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2011年5月26日

摘要: Object c也有和java相同的方法获取对象的属性列表方法,也就时反射了。 http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html下面这段代码演示了如何获取类的属性相关信息 #import <objc/runtime.h>#import <Foundation/Foundation.h>unsigned int outCount, i;objc_property_t *properties = class 阅读全文
posted @ 2011-05-26 14:07 Likwo 阅读(5078) 评论(0) 推荐(0) 编辑

摘要: 在baidu文库里发现了一篇好文章:Objective-C 2.0 运行时系统编程指南 ,不敢独享。http://wenku.baidu.com/view/e5f32600a6c30c2259019ef5.html 文章写的蛮好,对object c的分析还时很不错的。 阅读全文
posted @ 2011-05-26 12:24 Likwo 阅读(767) 评论(1) 推荐(0) 编辑