Rejigger ASCollectionNode initializers

This commit is contained in:
Adlai Holler
2016-11-22 16:49:52 -08:00
parent 60756a1da5
commit 04b93182cd
3 changed files with 25 additions and 13 deletions

View File

@@ -33,19 +33,19 @@ NS_ASSUME_NONNULL_BEGIN
*
* @discussion Initializes and returns a newly allocated collection node object with the specified layout.
*
* @param layout The layout object to use for organizing items. The collection view stores a strong reference to the specified object. Must not be nil.
* @param layout The layout object to use for organizing items. The collection node stores a strong reference to the specified object. Must not be nil.
*/
- (instancetype)initWithCollectionViewLayout:(UICollectionViewLayout *)layout;
/**
* Initializes an ASCollectionNode
*
* @discussion Initializes and returns a newly allocated collection node object with the specified frame and layout.
* @discussion Initializes and returns a newly allocated collection node object with the specified layout.
*
* @param frame The frame rectangle for the collection view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This frame is passed to the superclass during initialization.
* @param layout The layout object to use for organizing items. The collection view stores a strong reference to the specified object. Must not be nil.
* @param layout The layout object to use for organizing items. The collection node stores a strong reference to the specified object. Must not be nil.
* @param layoutInspector The layout inspector to use, or nil to use the ASDK default layout inspector.
*/
- (instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout;
- (instancetype)initWithCollectionViewLayout:(UICollectionViewLayout *)layout layoutInspector:(nullable id<ASCollectionViewLayoutInspecting>)layoutInspector;
/**
* Returns the corresponding ASCollectionView
@@ -416,6 +416,16 @@ NS_ASSUME_NONNULL_BEGIN
@interface ASCollectionNode (Deprecated)
/**
* Initializes an ASCollectionNode
*
* @discussion Initializes and returns a newly allocated collection node object with the specified frame and layout.
*
* @param frame The frame rectangle for the collection view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This frame is passed to the superclass during initialization.
* @param layout The layout object to use for organizing items. The collection view stores a strong reference to the specified object. Must not be nil.
*/
- (instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout ASDISPLAYNODE_DEPRECATED_MSG("Use -initWithCollectionViewLayout: instead.");
/**
* Reload everything from scratch, destroying the working range and all cached nodes.
*