What exactly is a so called quot;Class Clusterquot; in Objective-C?(究竟什么是所谓的“类集群?在Objective-C中?)
问题描述
我在读到 NSArray 就是这样一个东西.听起来很沉重.我的办公桌上有 7 本关于 Objective-C、Cocoa 和 C 的非常厚的书.它们都没有提到 Class Cluster,至少我在书后的索引中找不到.那是什么?
I was reading that NSArray is just such a thing. Sounds heavy. I have 7 really fat books here on my desk about Objective-C, Cocoa and C. None of them mention Class Cluster at all, at least I can't find it in the Index at the back of the books. So what's that?
推荐答案
来自 Apple 的文档....简而言之,它是 Foundation 框架中使用的一种设计模式,这可能是 ObjC 书籍中没有提到它的原因.
From Apple's docs.... In short it's a design pattern used in the Foundation framework, which is probably why it's not mentioned in ObjC books.
类集群是一种架构,它将许多私有的具体子类组合在一个公共的抽象超类下.以这种方式对类进行分组为用户提供了一个简化的界面,用户只能看到公开可见的架构.
A class cluster is an architecture that groups a number of private, concrete subclasses under a public, abstract superclass. The grouping of classes in this way provides a simplified interface to the user, who sees only the publicly visible architecture.
这篇关于究竟什么是所谓的“类集群"?在Objective-C中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:究竟什么是所谓的“类集群"?在Objective-C中?


- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01