updated with deprecated message

This commit is contained in:
Luke Zhao
2016-03-05 13:04:20 -08:00
parent 30463db034
commit 03e84e20ac
3 changed files with 9 additions and 26 deletions

View File

@@ -482,17 +482,15 @@ NS_ASSUME_NONNULL_BEGIN
@optional
/**
* Passthrough support to UICollectionViewDelegateFlowLayout sectionInset behavior.
*
* @param collectionView The sender.
* @param collectionViewLayout The layout object requesting the information.
* @param section The index number of the section whose insets are needed.
*
* @discussion The same rules apply as the UICollectionView implementation, but this can also be used without a UICollectionViewFlowLayout.
* https://developer.apple.com/library/ios/documentation/UIKit/Reference/UICollectionViewDelegateFlowLayout_protocol/index.html#//apple_ref/occ/intfm/UICollectionViewDelegateFlowLayout/collectionView:layout:insetForSectionAtIndex:
*
* @discussion This method is deprecated and does nothing from 1.9.7 and up
* Previously it applies the section inset to every cells within the corresponding section.
* The expected behavior is to apply the section inset to the whole section rather than
* shrinking each cell individually.
* If you want this behavior, you can integrate your insets calculation into
* `constrainedSizeForNodeAtIndexPath`
* please file a github issue if you would like this to be restored.
*/
- (UIEdgeInsets)collectionView:(ASCollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section;
- (UIEdgeInsets)collectionView:(ASCollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section __deprecated_msg("This method does nothing for 1.9.7+ due to incorrect implementation previously, see the header file for more information.");
/**
* Asks the delegate for the size of the header in the specified section.