iOS开发 怎么删除UICollectionView的cell
1个回答
展开全部
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的方法
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的方法
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询