VideoListViewController.m 1.51 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
//
//  VideoListViewController.m
//  Lighting
//
//  Created by 曹云霄 on 2016/11/25.
//  Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//

#import "VideoListViewController.h"
#import "VideoListItemTableViewCell.h"
#import "VideoListSectionHeaderView.h"

@interface VideoListViewController ()<UITableViewDelegate,UITableViewDataSource>

15 16 17

@property (weak, nonatomic) IBOutlet UIView *headerView;

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 55 56 57 58 59
@end

@implementation VideoListViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self setUpTableView];
}

#pragma mark - UITableView
- (void)setUpTableView
{
    self.studyListTableView.tableFooterView = [UIView new];
    self.studyListTableView.rowHeight = 50;
    self.studyListTableView.sectionHeaderHeight = 60;
}

#pragma mark - <UITableViewDelegate,UITableViewDataSource>
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    VideoListItemTableViewCell *studyItemCell = [tableView dequeueReusableCellWithIdentifier:@"VideoListItemTableViewCell" forIndexPath:indexPath];
    return studyItemCell;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 10;
}

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
    VideoListSectionHeaderView *headerView = [tableView dequeueReusableCellWithIdentifier:@"VideoListSectionHeaderView"];
    return headerView;
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 2;
}

@end