| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- //
- // RAOrderDetailViewController+TableViewDelegate.m
- // Apex And Drivers
- //
- // Created by Jack on 2018/6/2.
- // Copyright © 2018年 USAI. All rights reserved.
- //
- #import "RAOrderDetailViewController+TableViewDelegate.h"
- #import "RADetailBaseModel.h"
- #import "RADetailSingleLineModel.h"
- #import "RADetailMultLineModel.h"
- #import "RADetailLocationModel.h"
- #import "RADetailActionCollectionModel.h"
- @implementation RAOrderDetailViewController (TableViewDelegate)
- - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
-
- RADetailBaseModel *model = [self modelForIndexPath:indexPath];
-
- return model.height;
- }
- - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
- return 44.0f;
- }
- - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
-
- UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(tableView.bounds), 44.0f)];
- header.backgroundColor = ApexDriverGrayColor;
- UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 11, CGRectGetWidth(tableView.bounds) - 20, 22)];
- label.textColor = ApexDriverWhiteColor;
- [header addSubview:label];
-
- label.text = [self titleForSection:section];
-
- return header;
- }
- @end
|