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.
我有一个NSArray,我想翻转它,即颠倒对象的顺序。
NSArray
我可以通过创建一个 for 循环并移动所有对象来做到这一点。是否有一些不错的方法或技巧可以以另一种方式做到这一点?
NSArray* reversedArray = [[originalArray reverseObjectEnumerator] allObjects];
应该做的伎俩