Swiftgram/plans/section-infos-api/ASCollectionSection.h
Adlai Holler 56ee00986f [Architecture] Add plans for new Section Info Objects (#2067)
* [section-infos-api] Add ASSectionInfo.h

* Create Processes.md

* Update ASSectionInfo.h

* Update ASSectionInfo.h

* Add more changes/info

* More stuff

* More updates

* Make it a protocol

* Update things

* Oops

* Update Misc.m

* Update Overview.md

* Update ASCollectionSection.h

* Update ASCollectionSection.h
2016-08-16 10:19:58 -07:00

28 lines
1.0 KiB
Objective-C

/**
* Information about a section of items in a collection.
*
* This class is private to ASDK.
* Data sources may override -collectionView:infoForSectionAtIndex: to provide the
* "userInfo" object when the section is initially inserted. ASCollectionView
* vends the user info object publicly via "infoForSectionAtIndex:".
*/
@interface ASCollectionSection : NSObject
// Autoincrementing value, set by collection view immediately after creation.
@property NSInteger sectionID;
@property NSMutableDictionary<NSString *, NSMutableArray<ASCellNode *> *> *editingNodesByKind;
@property NSMutableDictionary<NSString *, NSMutableArray<ASCellNode *> *> *completedNodesByKind;
@property (strong, nullable) id<ASSectionUserInfo> userInfo;
@end
@protocol ASSectionUserInfo
// This will be set once, immediately after the object is returned by the data source.
@property (weak, nonatomic, nullable) ASCollectionView *collectionView;
// Could be optional, but need to cache -respondsToSelector: dynamically.
@property (nullable, readonly, copy) NSString *sectionName;
@end