From 5920a5cd7d86064e446ec301df564dabc7e8f905 Mon Sep 17 00:00:00 2001 From: Ofer Morag Date: Sat, 29 Jul 2017 00:32:38 +0300 Subject: [PATCH 1/2] Update adoption-guide-2-0-beta1.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Removed the “number” looks like a mistake - Changed `"` to `“` to match the ending sign --- docs/_docs/adoption-guide-2-0-beta1.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_docs/adoption-guide-2-0-beta1.md b/docs/_docs/adoption-guide-2-0-beta1.md index 18591a1ca..24a9ab430 100755 --- a/docs/_docs/adoption-guide-2-0-beta1.md +++ b/docs/_docs/adoption-guide-2-0-beta1.md @@ -96,7 +96,7 @@ Texture's collection and table APIs have been moved from the view space (`collec - Search your project for `tableView` and `collectionView`. Most, if not all, of the data source / delegate methods have new node versions. -It is important that developers using Texture understand that an ASCollectionNode is backed by an ASCollectionView (a subclass of UICollectionView). ASCollectionNode runs asynchronously, so calling number -numberOfRowsInSection on the collectionNode is different than calling it on the collectionView. +It is important that developers using Texture understand that an ASCollectionNode is backed by an ASCollectionView (a subclass of UICollectionView). ASCollectionNode runs asynchronously, so calling -numberOfRowsInSection on the collectionNode is different than calling it on the collectionView. For example, let's say you have an empty table. You insert `100` rows and then immediately call -tableView:numberOfRowsInSection. This will return `0` rows. If you call -waitUntilAllUpdatesAreCommitted after insertion (waits until the collectionNode synchronizes with the collectionView), you will get 100, _but_ you might block the main thread. A good developer should rarely (or never) need to use -waitUntilAllUpdatesAreCommitted. If you update the collectionNode and then need to read back immediately, you should use the collectionNode API. You shouldn't need to talk to the collectionView. @@ -122,7 +122,7 @@ Other updates include: - Renamed `pagerNode:constrainedSizeForNodeAtIndexPath:` to `pagerNode:constrainedSizeForNodeAtIndex:` -- collection view update validation assertions are now enabled. If you see something like `"Invalid number of items in section 2. The number of items after the update (7) must be equal to the number of items before the update (4) plus or minus the number of items inserted or removed from the section (4 inserted, 0 removed)”`, please check the data source logic. If you have any questions, reach out to us on GitHub. +- collection view update validation assertions are now enabled. If you see something like `“Invalid number of items in section 2. The number of items after the update (7) must be equal to the number of items before the update (4) plus or minus the number of items inserted or removed from the section (4 inserted, 0 removed)”`, please check the data source logic. If you have any questions, reach out to us on GitHub. Best Practices: From 82a01165001cc60876baf0ca3b2e97bd62e96ea0 Mon Sep 17 00:00:00 2001 From: Ofer Morag Date: Sat, 29 Jul 2017 00:40:41 +0300 Subject: [PATCH 2/2] Update adoption-guide-2-0-beta1.md Changing both sign to non-smart --- docs/_docs/adoption-guide-2-0-beta1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_docs/adoption-guide-2-0-beta1.md b/docs/_docs/adoption-guide-2-0-beta1.md index 24a9ab430..f3c199fff 100755 --- a/docs/_docs/adoption-guide-2-0-beta1.md +++ b/docs/_docs/adoption-guide-2-0-beta1.md @@ -122,7 +122,7 @@ Other updates include: - Renamed `pagerNode:constrainedSizeForNodeAtIndexPath:` to `pagerNode:constrainedSizeForNodeAtIndex:` -- collection view update validation assertions are now enabled. If you see something like `“Invalid number of items in section 2. The number of items after the update (7) must be equal to the number of items before the update (4) plus or minus the number of items inserted or removed from the section (4 inserted, 0 removed)”`, please check the data source logic. If you have any questions, reach out to us on GitHub. +- collection view update validation assertions are now enabled. If you see something like `"Invalid number of items in section 2. The number of items after the update (7) must be equal to the number of items before the update (4) plus or minus the number of items inserted or removed from the section (4 inserted, 0 removed)"`, please check the data source logic. If you have any questions, reach out to us on GitHub. Best Practices: