ios - NSMutableArray 最后一个对象

标签 ios nsmutablearray icarousel

我正在尝试 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/

相关文章:

ios - 使用 Core Image 渲染随机噪声 CALayer 会生成奇怪的伪像

ios - 如何将数据从我的 NSMutableDictionary 加载到我的 UITableView

ios - 错误 : Deployment Update target 8. 3 NSMutableArray 和 addObjectsFromArray - swift

javascript - 使用 joomla 3.0 实现 BBC gelui

ios - iCarousel 中的分页

ios - iCarousel 不在 iPhone 6+ 上呈现 4 个项目的第 3 个 View

ios - 当单元格包含特定项目时,如何找到自定义单元格的索引路径?

ios - 使用 Vmware OSX 编译应用程序

ios - isEqualToString : when setting text of a label 无法识别的选择器错误

ios - Objective-C NSMutableArray 在已声明的对象上分配 init