[ASCollectionView] synchronous mode#332
Merged
appleguy merged 5 commits intoTextureGroup:masterfrom Jun 6, 2017
Merged
Conversation
nguyenhuy
requested changes
Jun 6, 2017
Source/ASCollectionNode.mm
Outdated
|
|
||
| - (void)setUsesSynchronousDataLoading:(BOOL)usesSynchronousDataLoading | ||
| { | ||
| self.view.usesSynchronousDataLoading = usesSynchronousDataLoading; |
Member
There was a problem hiding this comment.
In the future, this may actually trigger a premature view allocation. Let's handle it now by putting the flag in pending state if the node is not loaded yet.
Source/Details/ASDataController.mm
Outdated
| }); | ||
|
|
||
| if (_usesSynchronousDataLoading) { | ||
| dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER); |
Member
There was a problem hiding this comment.
Can we call -waitUntilAllUpdatesAreCommitted instead?
appleguy
approved these changes
Jun 6, 2017
Member
appleguy
left a comment
There was a problem hiding this comment.
@nguyenhuy I fixed up your comments - thanks for the review, those were good suggestions. Take another look when you can, and feel free to merge this if it looks correct.
nguyenhuy
approved these changes
Jun 6, 2017
bernieperez
pushed a commit
to AtomTickets/Texture
that referenced
this pull request
Apr 25, 2018
* [ASCollectionView] synchronous mode * add to changelog * Update ASDataController.mm * Update ASCollectionNode.mm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
usesSynchronousDataLoadingmode toASCollectionView. When this mode is enabled,ASCollectionViewmatches the timing ofUICollectionViewas closely as possible, ensuring that all reload and edit operations are performed on the main thread as blocking calls.This mode is useful for applications that are debugging issues with their collection view implementation. In particular, some applications do not correctly conform to the
UICollectionViewAPI, and these apps may experience difficulties withASCollectionView. Providing this mode allows for developers to work on resolving their issues with the collection view data source, while ramping up on asynchronous collection layout.