SCSegmentedCell Class Reference
Inherits from | SCControlCell : SCCustomCell : SCTableViewCell : UITableViewCell |
Declared in | SCTableViewCell.h |
Overview
This class functions as a cell with a UISegmentedControl. The bound property of this cell must be of type NSNumber, int, or NSString.
Tasks
Creation and Initialization
-
+ cellWithText:boundObject:selectedSegmentIndexPropertyName:segmentTitlesArray:
-
– initWithText:boundObject:selectedSegmentIndexPropertyName:segmentTitlesArray:
Configuration
Class Methods
cellWithText:boundObject:selectedSegmentIndexPropertyName:segmentTitlesArray:
Allocates and returns an initialized SCSegmentedCell given cell text, bound object, and a bound property name.
+ (instancetype)cellWithText:(NSString *)cellText boundObject:(NSObject *)object selectedSegmentIndexPropertyName:(NSString *)propertyName segmentTitlesArray:(NSArray *)cellSegmentTitlesArray
Parameters
- cellText
The text that will appear in the cell’s textLabel.
- object
The cell’s bound object (see SCTableViewCell class overview).
- propertyName
The cell’s bound property name corresponding to the UISegmentedControl’s selectedSegmentIndex value. Property must be a readwrite property of type NSNumber.
- cellSegmentTitlesArray
An array containing title strings for UISegmentedControl’s segments.
Declared In
SCTableViewCell.h
Instance Methods
createSegmentsUsingArray:
Method creates segmented control segments based on the content of the segmentTitlesArray.
- (void)createSegmentsUsingArray:(NSArray *)segmentTitlesArray
Parameters
- segmentTitlesArray
Must be an array of NSString objects.
Declared In
SCTableViewCell.h
initWithText:boundObject:selectedSegmentIndexPropertyName:segmentTitlesArray:
Returns an initialized SCSegmentedCell given cell text, bound object, and a bound property name.
- (instancetype)initWithText:(NSString *)cellText boundObject:(NSObject *)object selectedSegmentIndexPropertyName:(NSString *)propertyName segmentTitlesArray:(NSArray *)cellSegmentTitlesArray
Parameters
- cellText
The text that will appear in the cell’s textLabel.
- object
The cell’s bound object (see SCTableViewCell class overview).
- propertyName
The cell’s bound property name corresponding to the UISegmentedControl’s selectedSegmentIndex value. Property must be a readwrite property of type NSNumber.
- cellSegmentTitlesArray
An array containing title strings for UISegmentedControl’s segments.
Declared In
SCTableViewCell.h