| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- //
- // RAHomeViewController+HomeTableDelegate.m
- // Apex And Drivers
- //
- // Created by Jack on 2018/6/1.
- // Copyright © 2018年 USAI. All rights reserved.
- //
- #import "RAHomeViewController+HomeTableDelegate.h"
- #import "RAHomeOrderModel.h"
- @implementation RAHomeViewController (HomeTableDelegate)
- - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
- return 110.0f;
- }
- - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
-
- UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(tableView.bounds), 44.0f)];
- header.backgroundColor = [UIColor lightGrayColor];
- UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 11, CGRectGetWidth(tableView.bounds) - 20, 22)];
- [header addSubview:label];
-
- label.text = [self titleForSection:section];
-
- return header;
- }
- - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
- return 44.f;
- }
- - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-
- RAHomeOrderModel *order = [self orderModelForIndexPath:indexPath];
- [self pushDetailViewControllerForModel:order];
- }
- @end
|