iOS开发 怎么删除UICollectionView的cell

 我来答
百家争鸣k8
2017-09-22 · 知道合伙人软件行家
百家争鸣k8
知道合伙人软件行家
采纳数:1727 获赞数:2553
曾经在认证领域或者相关领域取得工程师成就,会继续努力

向TA提问 私信TA
展开全部
deleteItemsAtIndexPaths:
Deletes the items at the specified index paths.

- (void)deleteItemsAtIndexPaths:(NSArray *)indexPaths
Parameters
indexPaths
An array of NSIndexPath objects, each of which contains a section index and item index for the item you want to delete from the collection view. This parameter must not be nil.
Discussion
Use this method to remove items from the collection view. You might do this when you remove the items from your data source object or in response to user interactions with the collection view. The collection view updates the layout of the remaining items to account for the deletions, animating the remaining items into position as needed.

You can also call this method from a block passed to the performBatchUpdates:completion: method when you want to animate multiple separate changes into place at the same time. See the description of that method for more information.

Availability
Available in iOS 6.0 and later.
Declared In
UICollectionView.h

collectionView自带有删除cell的方法
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式