Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想制作一个NSMutableArray并用创建的矩形填充它,比如说,NSRectMake。但是数组只允许对象。我应该怎么做才能保存NSRects在数组中?
NSMutableArray
NSRectMake
NSRects
使用NSValue专门为这些东西设计的。在你的情况下,使用valueWithRect:
NSValue
valueWithRect:
一切都在 Apple 相应的 Programming Guide 中进行了解释。