| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c129b78 commit 9873f4b
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -430,19 +430,6 @@ NS_ASSUME_NONNULL_BEGIN | |||
| 430 | 430 | ||
| 431 | 431 | @optional | |
| 432 | 432 | ||
| 433 | - - (void)collectionView:(ASCollectionView *)collectionView willDisplayNodeForItemAtIndexPath:(NSIndexPath *)indexPath; | ||
| 434 | - | ||
| 435 | - /** | ||
| 436 | - * Informs the delegate that the collection view did remove the provided node from the view hierarchy. | ||
| 437 | - * This may be caused by the node scrolling out of view, or by deleting the item | ||
| 438 | - * or its containing section with @c deleteItemsAtIndexPaths: or @c deleteSections: . | ||
| 439 | - * | ||
| 440 | - * @param collectionView The sender. | ||
| 441 | - * @param node The node which was removed from the view hierarchy. | ||
| 442 | - * @param indexPath The index path at which the node was located before it was removed. | ||
| 443 | - */ | ||
| 444 | - - (void)collectionView:(ASCollectionView *)collectionView didEndDisplayingNode:(ASCellNode *)node forItemAtIndexPath:(NSIndexPath *)indexPath; | ||
| 445 | - | ||
| 446 | 433 | /** | |
| 447 | 434 | * Receive a message that the collectionView is near the end of its data set and more data should be fetched if | |
| 448 | 435 | * necessary. | |
@@ -475,10 +462,43 @@ NS_ASSUME_NONNULL_BEGIN | |||
| 475 | 462 | * Informs the delegate that the collection view did remove the node which was previously | |
| 476 | 463 | * at the given index path from the view hierarchy. | |
| 477 | 464 | * | |
| 478 | - * This method is deprecated. Use @c collectionView:didEndDisplayingNode:forItemAtIndexPath: instead. | ||
| 465 | + * @warning AsyncDisplayKit processes table view edits asynchronously. The index path | ||
| 466 | + * passed into this method may not correspond to the same item in your data source | ||
| 467 | + * if your data source has been updated since the last edit was processed. | ||
| 468 | + * | ||
| 469 | + * This method is deprecated. Use @c visibleStateDidChange: on the cell node instead. | ||
| 479 | 470 | */ | |
| 480 | 471 | - (void)collectionView:(ASCollectionView *)collectionView didEndDisplayingNodeForItemAtIndexPath:(NSIndexPath *)indexPath ASDISPLAYNODE_DEPRECATED; | |
| 481 | 472 | ||
| 473 | + /** | ||
| 474 | + * Informs the delegate that the collection view will add the node | ||
| 475 | + * at the given index path to the view hierarchy. | ||
| 476 | + * | ||
| 477 | + * @warning AsyncDisplayKit processes collection view edits asynchronously. The index path | ||
| 478 | + * passed into this method may not correspond to the same item in your data source | ||
| 479 | + * if your data source has been updated since the last edit was processed. | ||
| 480 | + * | ||
| 481 | + * This method is deprecated. Use @c visibleStateDidChange: on the cell node instead. | ||
| 482 | + */ | ||
| 483 | + - (void)collectionView:(ASCollectionView *)collectionView willDisplayNodeForItemAtIndexPath:(NSIndexPath *)indexPath ASDISPLAYNODE_DEPRECATED; | ||
| 484 | + | ||
| 485 | + /** | ||
| 486 | + * Informs the delegate that the collection view did remove the provided node from the view hierarchy. | ||
| 487 | + * This may be caused by the node scrolling out of view, or by deleting the item | ||
| 488 | + * or its containing section with @c deleteItemsAtIndexPaths: or @c deleteSections: . | ||
| 489 | + * | ||
| 490 | + * @param collectionView The sender. | ||
| 491 | + * @param node The node which was removed from the view hierarchy. | ||
| 492 | + * @param indexPath The index path at which the node was located before it was removed. | ||
| 493 | + * | ||
| 494 | + * @warning AsyncDisplayKit processes collection view edits asynchronously. The index path | ||
| 495 | + * passed into this method may not correspond to the same item in your data source | ||
| 496 | + * if your data source has been updated since the last edit was processed. | ||
| 497 | + * | ||
| 498 | + * This method is deprecated. Use @c visibleStateDidChange: on the cell node instead. | ||
| 499 | + */ | ||
| 500 | + - (void)collectionView:(ASCollectionView *)collectionView didEndDisplayingNode:(ASCellNode *)node forItemAtIndexPath:(NSIndexPath *)indexPath ASDISPLAYNODE_DEPRECATED; | ||
| 501 | + | ||
| 482 | 502 | @end | |
| 483 | 503 | ||
| 484 | 504 | /** | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -605,9 +605,12 @@ - (void)collectionView:(UICollectionView *)collectionView willDisplayCell:(_ASCo | |||
| 605 | 605 | ASCellNode *cellNode = [cell node]; | |
| 606 | 606 | cellNode.scrollView = collectionView; | |
| 607 | 607 | ||
| 608 | + #pragma clang diagnostic push | ||
| 609 | + #pragma clang diagnostic ignored "-Wdeprecated-declarations" | ||
| 608 | 610 | if (_asyncDelegateFlags.asyncDelegateCollectionViewWillDisplayNodeForItemAtIndexPath) { | |
| 609 | 611 | [_asyncDelegate collectionView:self willDisplayNodeForItemAtIndexPath:indexPath]; | |
| 610 | 612 | } | |
| 613 | + #pragma clang diagnostic pop | ||
| 611 | 614 | ||
| 612 | 615 | [_rangeController visibleNodeIndexPathsDidChangeWithScrollDirection:self.scrollDirection]; | |
| 613 | 616 | ||
@@ -625,10 +628,13 @@ - (void)collectionView:(UICollectionView *)collectionView didEndDisplayingCell:( | |||
| 625 | 628 | ||
| 626 | 629 | ASCellNode *cellNode = [cell node]; | |
| 627 | 630 | ||
| 631 | + #pragma clang diagnostic push | ||
| 632 | + #pragma clang diagnostic ignored "-Wdeprecated-declarations" | ||
| 628 | 633 | if (_asyncDelegateFlags.asyncDelegateCollectionViewDidEndDisplayingNodeForItemAtIndexPath) { | |
| 629 | 634 | ASDisplayNodeAssertNotNil(cellNode, @"Expected node associated with removed cell not to be nil."); | |
| 630 | 635 | [_asyncDelegate collectionView:self didEndDisplayingNode:cellNode forItemAtIndexPath:indexPath]; | |
| 631 | 636 | } | |
| 637 | + #pragma clang diagnostic pop | ||
| 632 | 638 | ||
| 633 | 639 | if ([_cellsForVisibilityUpdates containsObject:cell]) { | |
| 634 | 640 | [_cellsForVisibilityUpdates removeObject:cell]; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -390,19 +390,6 @@ NS_ASSUME_NONNULL_BEGIN | |||
| 390 | 390 | ||
| 391 | 391 | @optional | |
| 392 | 392 | ||
| 393 | - - (void)tableView:(ASTableView *)tableView willDisplayNodeForRowAtIndexPath:(NSIndexPath *)indexPath; | ||
| 394 | - | ||
| 395 | - /** | ||
| 396 | - * Informs the delegate that the table view did remove the provided node from the view hierarchy. | ||
| 397 | - * This may be caused by the node scrolling out of view, or by deleting the row | ||
| 398 | - * or its containing section with @c deleteRowsAtIndexPaths:withRowAnimation: or @c deleteSections:withRowAnimation: . | ||
| 399 | - * | ||
| 400 | - * @param tableView The sender. | ||
| 401 | - * @param node The node which was removed from the view hierarchy. | ||
| 402 | - * @param indexPath The index path at which the node was located before the removal. | ||
| 403 | - */ | ||
| 404 | - - (void)tableView:(ASTableView *)tableView didEndDisplayingNode:(ASCellNode *)node forRowAtIndexPath:(NSIndexPath *)indexPath; | ||
| 405 | - | ||
| 406 | 393 | /** | |
| 407 | 394 | * Receive a message that the tableView is near the end of its data set and more data should be fetched if necessary. | |
| 408 | 395 | * | |
@@ -430,14 +417,47 @@ NS_ASSUME_NONNULL_BEGIN | |||
| 430 | 417 | */ | |
| 431 | 418 | - (BOOL)shouldBatchFetchForTableView:(ASTableView *)tableView; | |
| 432 | 419 | ||
| 420 | + /** | ||
| 421 | + * Informs the delegate that the table view did remove the provided node from the view hierarchy. | ||
| 422 | + * This may be caused by the node scrolling out of view, or by deleting the row | ||
| 423 | + * or its containing section with @c deleteRowsAtIndexPaths:withRowAnimation: or @c deleteSections:withRowAnimation: . | ||
| 424 | + * | ||
| 425 | + * @param tableView The sender. | ||
| 426 | + * @param node The node which was removed from the view hierarchy. | ||
| 427 | + * @param indexPath The index path at which the node was located before the removal. | ||
| 428 | + * | ||
| 429 | + * @warning AsyncDisplayKit processes table view edits asynchronously. The index path | ||
| 430 | + * passed into this method may not correspond to the same item in your data source | ||
| 431 | + * if your data source has been updated since the last edit was processed. | ||
| 432 | + * | ||
| 433 | + * This method is deprecated. Use @c visibleStateDidChange: on the cell node instead. | ||
| 434 | + */ | ||
| 435 | + - (void)tableView:(ASTableView *)tableView didEndDisplayingNode:(ASCellNode *)node forRowAtIndexPath:(NSIndexPath *)indexPath ASDISPLAYNODE_DEPRECATED; | ||
| 436 | + | ||
| 433 | 437 | /** | |
| 434 | 438 | * Informs the delegate that the table view did remove the node which was previously | |
| 435 | 439 | * at the given index path from the view hierarchy. | |
| 436 | 440 | * | |
| 437 | - * This method is deprecated. Use @c tableView:didEndDisplayingNode:forRowAtIndexPath: instead. | ||
| 441 | + * @warning AsyncDisplayKit processes table view edits asynchronously. The index path | ||
| 442 | + * passed into this method may not correspond to the same item in your data source | ||
| 443 | + * if your data source has been updated since the last edit was processed. | ||
| 444 | + * | ||
| 445 | + * This method is deprecated. Use @c visibleStateDidChange: on the cell node instead. | ||
| 438 | 446 | */ | |
| 439 | 447 | - (void)tableView:(ASTableView *)tableView didEndDisplayingNodeForRowAtIndexPath:(NSIndexPath *)indexPath ASDISPLAYNODE_DEPRECATED; | |
| 440 | 448 | ||
| 449 | + /** | ||
| 450 | + * Informs the delegate that the table view will add the node | ||
| 451 | + * at the given index path to the view hierarchy. | ||
| 452 | + * | ||
| 453 | + * @warning AsyncDisplayKit processes table view edits asynchronously. The index path | ||
| 454 | + * passed into this method may not correspond to the same item in your data source | ||
| 455 | + * if your data source has been updated since the last edit was processed. | ||
| 456 | + * | ||
| 457 | + * This method is deprecated. Use @c visibleStateDidChange: on the cell node instead. | ||
| 458 | + */ | ||
| 459 | + - (void)tableView:(ASTableView *)tableView willDisplayNodeForRowAtIndexPath:(NSIndexPath *)indexPath ASDISPLAYNODE_DEPRECATED; | ||
| 460 | + | ||
| 441 | 461 | @end | |
| 442 | 462 | ||
| 443 | 463 | @protocol ASTableViewDelegate <ASTableDelegate> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -623,9 +623,12 @@ - (void)tableView:(UITableView *)tableView willDisplayCell:(_ASTableViewCell *)c | |||
| 623 | 623 | ASCellNode *cellNode = [cell node]; | |
| 624 | 624 | cellNode.scrollView = tableView; | |
| 625 | 625 | ||
| 626 | + #pragma clang diagnostic push | ||
| 627 | + #pragma clang diagnostic ignored "-Wdeprecated-declarations" | ||
| 626 | 628 | if (_asyncDelegateFlags.asyncDelegateTableViewWillDisplayNodeForRowAtIndexPath) { | |
| 627 | 629 | [_asyncDelegate tableView:self willDisplayNodeForRowAtIndexPath:indexPath]; | |
| 628 | 630 | } | |
| 631 | + #pragma clang diagnostic pop | ||
| 629 | 632 | ||
| 630 | 633 | [_rangeController visibleNodeIndexPathsDidChangeWithScrollDirection:[self scrollDirection]]; | |
| 631 | 634 | ||
@@ -648,10 +651,13 @@ - (void)tableView:(UITableView *)tableView didEndDisplayingCell:(_ASTableViewCel | |||
| 648 | 651 | ||
| 649 | 652 | [_rangeController visibleNodeIndexPathsDidChangeWithScrollDirection:[self scrollDirection]]; | |
| 650 | 653 | ||
| 654 | + #pragma clang diagnostic push | ||
| 655 | + #pragma clang diagnostic ignored "-Wdeprecated-declarations" | ||
| 651 | 656 | if (_asyncDelegateFlags.asyncDelegateTableViewDidEndDisplayingNodeForRowAtIndexPath) { | |
| 652 | 657 | ASDisplayNodeAssertNotNil(cellNode, @"Expected node associated with removed cell not to be nil."); | |
| 653 | 658 | [_asyncDelegate tableView:self didEndDisplayingNode:cellNode forRowAtIndexPath:indexPath]; | |
| 654 | 659 | } | |
| 660 | + #pragma clang diagnostic pop | ||
| 655 | 661 | ||
| 656 | 662 | if ([_cellsForVisibilityUpdates containsObject:cell]) { | |
| 657 | 663 | [_cellsForVisibilityUpdates removeObject:cell]; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments