This repository was archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathNibwareTableSectionManager.h
More file actions
54 lines (41 loc) · 1.66 KB
/
NibwareTableSectionManager.h
File metadata and controls
54 lines (41 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//
// NibwareTableSectionManager.h
// pingle
//
// Created by robertsanders on 1/19/09.
// Copyright 2009 Robert Sanders. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol NibwareSectionFunction <NSObject>
- (NSString*) sectionForObject:(id)object;
@end
@interface NibwareTableSection : NSObject {
NSString* sectionName;
NSMutableArray* items;
}
@property (retain) NSString* sectionName;
@property (retain) NSMutableArray* items;
- (NibwareTableSection*) initWithSectionName:(NSString*)name;
- (void) addObject:(id<NSObject>) item;
- (id) objectAtIndex:(NSInteger)index;
@end
@interface NibwareTableSectionManager : NSObject {
NSMutableArray* sections;
id<NibwareSectionFunction> sectionFunction;
NibwareTableSection* defaultSection;
}
@property (retain) id<NibwareSectionFunction> sectionFunction;
@property (readonly) NSMutableArray* sections;
- (NibwareTableSectionManager*) initWithSectionFunction:(id<NibwareSectionFunction>)function;
- (void) reset;
- (void) sectionalize:(NSArray*)items;
- (NSInteger) sectionCount;
- (NibwareTableSection*) sectionByIndex:(NSInteger)num;
- (NibwareTableSection*) sectionByName:(NSString *)name;
// uitableviewdatasource-like methods
- (id) objectForIndexPath:(NSIndexPath*) path;
- (NSIndexPath*) indexPathForObject:(id<NSObject>)object;
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView;
- (NSString*)tableView:(UITableView*)table titleForHeaderInSection:(NSInteger)section;
- (NSInteger)tableView:(UITableView *)table numberOfRowsInSection:(NSInteger)section;
@end