IGListKit/Source/IGListSupplementaryViewSource.h
Bas Broek edc38c77fe Remove @param alignment from header docs #trivial
Summary:
Issue fixed: #655

- [x] All tests pass. Demo project builds and runs.
- [ ] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)

I've also addressed a few cases where there was no empty line between the `param`s and `return`.
Closes https://github.com/Instagram/IGListKit/pull/665

Differential Revision: D4906215

Pulled By: jessesquires

fbshipit-source-id: 5693c85eb548644b0b0e2571eea8ff4d9f706b12
2017-04-18 09:46:18 -07:00

54 lines
1.9 KiB
Objective-C

/**
* Copyright (c) 2016-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
/**
Conform to this protocol to provide information about a list's supplementary views. This data is used in
`IGListAdapter` which then configures and maintains a `UICollectionView`. The supplementary API reflects that in
`UICollectionView`, `UICollectionViewLayout`, and `UICollectionViewDataSource`.
*/
@protocol IGListSupplementaryViewSource <NSObject>
/**
Asks the SupplementaryViewSource for an array of supported element kinds.
@return An array of element kind strings that the supplementary source handles.
*/
- (NSArray<NSString *> *)supportedElementKinds;
/**
Asks the SupplementaryViewSource for a configured supplementary view for the specified kind and index.
@param elementKind The kind of supplementary view being requested
@param index The index for the supplementary veiw being requested.
@note This is your opportunity to do any supplementary view setup and configuration.
@warning You should never allocate new views in this method. Instead deque a view from the `IGListCollectionContext`.
*/
- (__kindof UICollectionReusableView *)viewForSupplementaryElementOfKind:(NSString *)elementKind
atIndex:(NSInteger)index;
/**
Asks the SupplementaryViewSource for the size of a supplementary view for the given kind and index path.
@param elementKind The kind of supplementary view.
@param index The index of the requested view.
@return The size for the supplementary view.
*/
- (CGSize)sizeForSupplementaryViewOfKind:(NSString *)elementKind
atIndex:(NSInteger)index;
@end
NS_ASSUME_NONNULL_END