|
|
@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@interface OWSTableContents : NSObject
|
|
|
|
@interface OWSTableContents : NSObject
|
|
|
|
|
|
|
|
|
|
|
|
@property (nonatomic) NSString *title;
|
|
|
|
@property (nonatomic) NSString *title;
|
|
|
|
@property (nonatomic) NSMutableArray *sections;
|
|
|
|
@property (nonatomic) NSMutableArray<OWSTableSection *> *sections;
|
|
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
@ -23,12 +23,15 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
|
|
|
|
@implementation OWSTableContents
|
|
|
|
@implementation OWSTableContents
|
|
|
|
|
|
|
|
|
|
|
|
- (void)addSection:(OWSTableSection *)section {
|
|
|
|
-(instancetype)init {
|
|
|
|
OWSAssert(section);
|
|
|
|
if (self = [self init]) {
|
|
|
|
|
|
|
|
|
|
|
|
if (!_sections) {
|
|
|
|
|
|
|
|
_sections = [NSMutableArray new];
|
|
|
|
_sections = [NSMutableArray new];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return self;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- (void)addSection:(OWSTableSection *)section {
|
|
|
|
|
|
|
|
OWSAssert(section);
|
|
|
|
|
|
|
|
|
|
|
|
[_sections addObject:section];
|
|
|
|
[_sections addObject:section];
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -40,7 +43,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@interface OWSTableSection : NSObject
|
|
|
|
@interface OWSTableSection : NSObject
|
|
|
|
|
|
|
|
|
|
|
|
@property (nonatomic) NSString *title;
|
|
|
|
@property (nonatomic) NSString *title;
|
|
|
|
@property (nonatomic) NSMutableArray *items;
|
|
|
|
@property (nonatomic) NSMutableArray<OWSTableItem *> *items;
|
|
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
@ -56,6 +59,13 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
return section;
|
|
|
|
return section;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-(instancetype)init {
|
|
|
|
|
|
|
|
if (self = [self init]) {
|
|
|
|
|
|
|
|
_items = [NSMutableArray new];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return self;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void)addItem:(OWSTableItem *)item {
|
|
|
|
- (void)addItem:(OWSTableItem *)item {
|
|
|
|
OWSAssert(item);
|
|
|
|
OWSAssert(item);
|
|
|
|
|
|
|
|
|
|
|
|