Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 7, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Source/FORMDataSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ typedef void (^FORMFieldFieldUpdatedBlock)(id cell,
*/
- (void)disable;

/*!
* Collapse group with group id
* @param group A group id
*/
- (void)collapseGroup:(NSInteger)group;

/*!
* Collapse all groups
*/
Expand Down Expand Up @@ -240,4 +246,10 @@ includingHiddenFields:(BOOL)includingHiddenFields
*/
- (void)reloadFieldsAtIndexPaths:(NSArray *)indexPaths;

/*!
* @discussion Check if group is collapsed
* @param group A group id
*/
- (BOOL)groupIsCollapsed:(NSInteger)group;

@end
5 changes: 5 additions & 0 deletions Source/FORMDataSource.m
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,11 @@ - (BOOL)isEnabled {
return !_disabled;
}

- (void)collapseGroup:(NSInteger)group {
[self collapseFieldsInGroup:group
collectionView:self.collectionView];
}

- (void)collapseAllGroups {
[self collapseAllGroupsForCollectionView:self.collectionView];
}
Expand Down