performbatchupdates

Nightmare with performBatchUpdates crash

一个人想着一个人 提交于 2020-01-01 04:31:08
问题 I am facing a nightmare of a crash during performBatchUpdates on a collection view . The problem is basically this: I have a lot of images on a directory on a server. I want to show the thumbnails of those files on a collection view . But the thumbnail have to be downloaded from the server asynchronously . As they arrive they will be inserted on the collection view using something like this: dispatch_async(dispatch_get_main_queue(), ^{ [self.collectionView performBatchUpdates:^{ if

Nightmare with performBatchUpdates crash

て烟熏妆下的殇ゞ 提交于 2019-12-03 12:06:35
I am facing a nightmare of a crash during performBatchUpdates on a collection view . The problem is basically this: I have a lot of images on a directory on a server. I want to show the thumbnails of those files on a collection view . But the thumbnail have to be downloaded from the server asynchronously . As they arrive they will be inserted on the collection view using something like this: dispatch_async(dispatch_get_main_queue(), ^{ [self.collectionView performBatchUpdates:^{ if (removedIndexes && [removedIndexes count] > 0) { [self.collectionView deleteItemsAtIndexPaths:removedIndexes]; }

How to solve this CollectionView crash?

最后都变了- 提交于 2019-11-27 16:16:46
问题 My app has two CollectionViewController s. Only one is visible at a given time. I have created the following structure on storyboard: two container views on top of each other. Every container view has a CollectionViewController embedded. The visibility of a particular container view determines which collectionViewController is visible. This is the problem. Both CollectionViewController s are receiving data in parallel but iOS has a bug that will make the app crash if one