我正在尝试 iCarousel,有一个函数可以删除 View 的索引和数组的索引,
NSInteger index = carousel.currentItemIndex;
[carousel removeItemAtIndex:index animated:YES];
[imagesArray removeObjectAtIndex:index];
我将删除它直到剩下一项,然后如果还有一项我想插入它的副本。我试过这个:
insertItemAtindex:carousel.currentItemIndex
但它插入的是最后一个 View 。
但我想要的是在我的 View 中插入 carousel/imagesArray 的最后一个对象/索引。我如何实现它,或者我如何确定 NSMutableArray 的最后一个对象留在 View 中?
最佳答案
carousel.lastObject
!!!!!!!!!!
关于ios - NSMutableArray 最后一个对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11246010/