unrecognized selector sent to class

 Other Linker Flags=-ObjC

 

-all_load Loads all members of static archive libraries.

-ObjC Loads all members of static archive libraries that implement an Objective-C class or category.

-force_load (path_to_archive) Loads all members of the specified static archive library. Note: -all_load forces all members of all archives to be loaded. This option allows you to target a specific archive.

翻译过来就是-all_load就是会加载静态库文件中的所有成员,

-ObjC就是会加载静 态库文件中实现一个类或者分类的所有成员,

-force_load(包的路径)就是会加载指定路径的静态库文件中的所有成员。

所以对于使用runtime 时候的反射调用的方法应该使用这三个中的一个进行link,以保证所有的类都可以加载到内存中供程序动态调用

 
posted @ 2016-02-24 17:11  幽谷清水  阅读(629)  评论(0编辑  收藏  举报