IMDrawersTableView is a simple iOS table view with drawers instead of standard cells.
- Requires iOS 7 or later
- Requires Automatic Reference Counting (ARC)
Please feel free to try the IMDrawersTableViewDemo project in Xcode. It demonstrates the setup and behaviour of the table view and also provides a couple of UX ideas for implementation.
If you are using CocoaPods, simply add pod 'IMDrawersTableView'
to your Podfile.
Simply drag & drop the IMDrawersTableView
folder to your project.
IMDrawersTableView has a very similar usage to UITableView. Please see the following steps:
####1. Import the header file
#import "IMDrawersTableVew.h"
####2. Initialize the table view and set dataSource and delegate properties
_tableView = [IMDrawersTableView new];
_tableView.dataSource = self;
_tableView.delegate = self;
[self.view addSubview:_tableView];
####3. Set the frame for table view
- (void)viewWillLayoutSubviews {
[super viewWillLayoutSubviews];
_tableView.frame = self.view.bounds;
}
####4. Implement required data source methods
- (UIView *)headerViewForTableView:(IMDrawersTableView *)tableView {
return [YourCustomTableHeaderView new];
}
- (NSInteger)numberOfCellsInTableView:(IMDrawersTableView *)tableView {
return 3;
}
- (IMDrawersTableViewCell *)tableView:(IMDrawersTableView *)tableView cellAtIndex:(NSInteger)index {
IMDrawersTableViewCell *cell = [IMDrawersTableViewCell new];
cell.headerView = [YourCustomCellHeaderView new];
cell.contentView = [YourCustomCellContentView new];
return cell;
}
IMDrawersTableView is available under the MIT license. See the LICENSE file for more info.