AWFTableSection
Objective-C
@interface AWFTableSection
Swift
class AWFTableSection
An AWFTableSection
object is a convenience class to manage an array of sections and rows to display within a UITableView
.
-
The title to display for the section.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *title;
Swift
var title: String? { get set }
-
The text to display for the section’s footer.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *footerTitle;
Swift
var footerTitle: String? { get set }
-
An array of
AWFTableSectionRow
instances to display within the section.Declaration
Objective-C
@property (nonatomic, strong, readonly, nullable) NSArray<AWFTableSectionRow *> *rows;
Swift
var rows: [AWFTableSectionRow]? { get }
-
Creates and returns a
AWFTableSection
instance initialized with the specified title. *Declaration
Objective-C
+ (nonnull instancetype)sectionWithTitle:(nullable NSString *)title;
Swift
convenience init(title: String?)
Parameters
title
The title of the section *
Return Value
An initialized section with the title
-
Creates and returns a
AWFTableSection
instance initialized with the specified title and array of rows. *Declaration
Objective-C
+ (nonnull instancetype)sectionWithTitle:(nullable NSString *)title rows:(nullable NSArray *)rows;
Swift
convenience init(title: String?, rows: [Any]?)
Parameters
title
The title of the section
rows
The rows to display with the section *
Return Value
An initialized section with the title and rows
-
Adds a new row to the section. The row will be added to the end of the
rows
array. *Declaration
Objective-C
- (void)addRow:(nonnull AWFTableSectionRow *)row;
Swift
func addRow(_ row: AWFTableSectionRow)
Parameters
row
The row to add
-
Adds an array of rows to the section. The rows will be added to the end of the
rows
array. *Declaration
Objective-C
- (void)addRows:(nonnull NSArray *)rows;
Swift
func addRows(_ rows: [Any])
Parameters
rows
An array of rows to add
-
Removes a row from the section. *
Declaration
Objective-C
- (void)removeRow:(nonnull AWFTableSectionRow *)row;
Swift
func removeRow(_ row: AWFTableSectionRow)
Parameters
row
The row to remove
-
Removes an array of rows from the array. *
Declaration
Objective-C
- (void)removeRows:(nonnull NSArray *)rows;
Swift
func removeRows(_ rows: [Any])
Parameters
rows
An array of rows to remove
-
Removes all rows from the section.
Declaration
Objective-C
- (void)removeAllRows;
Swift
func removeAllRows()