SCExpandCollapseCell
@interface SCExpandCollapseCell : SCCustomCell
SCExpandCollapseCell is a special cell class that, once tapped, collapses its owner section’s contents into a single cell. When tapped again, it will expand the section’s contents to their original state.
Sample use: mySection.expandCollapseCell = [SCExpandCollapseCell cellWithExpandText:@“Expand Section” collapseText:@“Collapse Section” ownerSectionExpanded:FALSE];
See also: SCTableViewSection
Note
SCExpandCollapseCell is always displayed at the top of the section.-
Allocates and returns an initialized SCExpandCollapseCell given its expandText, collapseText, an initial owner section expand state.
Declaration
Objective-C
+ (instancetype)cellWithExpandText:(NSString *)expandText collapseText:(NSString *)collapseText ownerSectionExpanded:(BOOL)expanded;
Parameters
expandText
The text that will be displayed in the cell when the section is collapsed.
collapseText
The text that will be displayed in the cell when the section is expanded.
expanded
The initial expanded state of the cell’s owner section.
-
Returns an initialized SCExpandCollapseCell given its expandText, collapseText, an initial owner section expand state.
Declaration
Objective-C
- (instancetype)initWithExpandText:(NSString *)expandText collapseText:(NSString *)collapseText ownerSectionExpanded:(BOOL)expanded;
Parameters
expandText
The text that will be displayed in the cell when the section is collapsed.
collapseText
The text that will be displayed in the cell when the section is expanded.
expanded
The initial expanded state of the cell’s owner section.
-
The text that will be displayed in the cell when the section is collapsed.
Declaration
Objective-C
@property (nonatomic, copy) NSString *expandText;
-
The text that will be displayed in the cell when the section is expanded.
Declaration
Objective-C
@property (nonatomic, copy) NSString *collapseText;
-
The expanded state of the ownerSection. Set to TRUE to expand the ownerSection’s content. Default:FALSE.
Declaration
Objective-C
@property (nonatomic) BOOL ownerSectionExpanded;