求懂objective-c的大神解释下面这段话Also,object/category named pairs must be unique.Only one NSString Name Utili-ties category can exist in a given Objective-C namespace.This can be tricky because theObjective-C namespace is shared between
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/19 12:16:41
求懂objective-c的大神解释下面这段话Also,object/category named pairs must be unique.Only one NSString Name Utili-ties category can exist in a given Objective-C namespace.This can be tricky because theObjective-C namespace is shared between
求懂objective-c的大神解释下面这段话
Also,object/category named pairs must be unique.Only one NSString Name Utili-
ties category can exist in a given Objective-C namespace.This can be tricky because the
Objective-C namespace is shared between the program code and all the libraries,frame-
works,and plug-ins.This is especially important for Objective-C programmers writing
screensavers,preference panes,and other plug-ins because their code will be injected intoapplication or framework code that they do not control.
求懂objective-c的大神解释下面这段话Also,object/category named pairs must be unique.Only one NSString Name Utili-ties category can exist in a given Objective-C namespace.This can be tricky because theObjective-C namespace is shared between
你这段应该是出自Stephen Categories G. Kochan的《Programming in Objective-C》一书
本小节应该是(我们可以称作类目、分类)的某些注意事项
我认为这段的知识点如果不明白可以pass掉,编译器会提醒你的分类是否使用正确
Also, object/category named pairs must be unique.
同样的,对象/分类命名对必须是唯一的. 【应该指的是类似这样的@interface NSString(Utilities)】
Only one NSString Name Utili-
ties category can exist in a given Objective-C namespace.
在给定的Objective-C命名空间中,只能存在一个NSString(私有的)分类.
This can be tricky because the
Objective-C namespace is shared between the program code and all the libraries, frame-
works, and plug-ins.
这样做会比较复杂,因为Objective-C命名空间共享于程序代码和所有库、框架、插件之间.
This is especially important for Objective-C programmers writing
screensavers, preference panes, and other plug-ins because their code will be injected into application or framework code that they do not control.
这对于编写屏保、偏好设置面板和其他插件的oc程序员尤为重要,因为这些代码将插入到他们无法控制的应用程序或框架中