为什么有 NSInteger 而不是 NSLong 甚至 NSLongLong?

Why is there NSInteger and not NSLong or even NSLongLong?

NSInteger 是整型对象。所以肯定应该有长对象?

NSInteger 是基础类型,as you can see here.

还有其他有用的基本类型,如 NSRect、NSSize 等。

A​​pple 只是选择不在 foundation 中定义 NSLong 或 NSLongLong 类型。

有关何时使用 NSInteger(以及它们背后的注意事项)的更多信息,请参见 in this related question

NSIntegerNSUInteger 是特定于平台的,因此在 32 位系统上声明为 int,在 64 位系统上声明为 long。