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中?


基础教程推荐
- NSString intValue 不能用于检索电话号码 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01