//
//  ALGroupReplayInfoView.m
//  GMAlpha
//
//  Created by zhb on 2018/11/7.
//  Copyright © 2018 Gengmei. All rights reserved.
//

#import "ALGroupReplayInfoView.h"

@interface ALGroupReplayInfoView()<UITableViewDataSource, UITableViewDelegate>
@property (nonatomic, strong) UITableView *tableView;
@end
@implementation ALGroupReplayInfoView
#pragma mark - life cycle
- (void)setup {
    [super setup];
    [self addSubview:self.tableView];
}

#pragma mark - system dataSource and delegate

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

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    //  1.  创建cell
    static NSString *ID = @"group_replayCell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
    }
    
    //  2.  设置cell的数据/子控件的状态
    
    
    //  3.  返回cell
    return cell;
}







#pragma mark - private methods


#pragma mark - getters and setters

- (UITableView *)tableView {
    if (_tableView == nil) {
        _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
        _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
        _tableView.delegate = self;
        _tableView.dataSource = self;
        _tableView.rowHeight = UITableViewAutomaticDimension;
        _tableView.estimatedRowHeight = 80;
        _tableView.sectionHeaderHeight = 0;
        _tableView.sectionFooterHeight = 0;
        _tableView.backgroundColor = [UIColor clearColor];
        if(@available(iOS 11.0, *)) {
            _tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
        }
    }
    return _tableView;
}

@end






//
//
//
//@interface ALOneUserCell : GMTableViewCell
//@property (nonatomic, strong) UILabel *userNameLabel;
//@property (nonatomic, strong) UILabel *contentLabel;
//@end
//@implementation ALOneUserCell
//#pragma mark - life cycle
//- (void)setup {
//    [super setup];
//    [self.contentView addSubview:self.userNameLabel];
//    [self.contentView addSubview:self.contentLabel];
//    [self addSubviewConstraints];
//}
//
//#pragma mark - system dataSource and delegate
//
//#pragma mark - private methods
//- (void)addSubviewConstraints {
//    [self.userNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.left.mas_equalTo(0);
//        make.top.bottom.mas_equalTo(0);
//    }];
//    [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.left.equalTo(self.userNameLabel.mas_right).offset(10);
//        make.right.mas_equalTo(0);
//        make.top.bottom.mas_equalTo(0);
//    }];
//}
//
//#pragma mark - getters and setters
//
//- (UILabel *)userNameLabel
//{
//    if (_userNameLabel == nil) {
//        _userNameLabel = [[UILabel alloc] init];
//        _userNameLabel.textColor = UIColor.headlineText;
//        _userNameLabel.font = [UIFont gmBoldFont:13];
//    }
//    return _userNameLabel;
//}
//
//- (UILabel *)contentLabel
//{
//    if (_contentLabel == nil) {
//        _contentLabel = [[UILabel alloc] init];
//        _contentLabel.textColor = UIColor.headlineText;
//        _contentLabel.font = [UIFont gmFont:13];
//    }
//    return _contentLabel;
//}
//
//@end
//
//@interface ALTwoUserCell : GMTableViewCell
//@property (nonatomic, strong) UILabel *userNameLabel;
//@property (nonatomic, strong) UILabel *replyUserIdLabel;
//@property (nonatomic, strong) UILabel *contentLabel;
//@property (nonatomic, strong) UIImageView *directionImageView;
//@end
//@implementation ALTwoUserCell
//#pragma mark - life cycle
//- (void)setup {
//    [super setup];
//    [self.contentView addSubview:self.userNameLabel];
//    [self.contentView addSubview:self.replyUserIdLabel];
//    [self.contentView addSubview:self.userNameLabel];
//    [self.contentView addSubview:self.directionImageView];
//    [self addSubviewConstraints];
//}
//
//#pragma mark - system dataSource and delegate
//
//#pragma mark - private methods
//- (void)addSubviewConstraints {
//    [self.userNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.left.mas_equalTo(0);
//        make.top.bottom.mas_equalTo(0);
//    }];
//    [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.left.equalTo(self.userNameLabel.mas_right).offset(10);
//        make.right.mas_equalTo(0);
//        make.top.bottom.mas_equalTo(0);
//    }];
//}
//
//#pragma mark - getters and setters
//
//- (UILabel *)userNameLabel
//{
//    if (_userNameLabel == nil) {
//        _userNameLabel = [[UILabel alloc] init];
//        _userNameLabel.textColor = UIColor.headlineText;
//        _userNameLabel.font = [UIFont gmBoldFont:13];
//    }
//    return _userNameLabel;
//}
//
//- (UILabel *)replyUserIdLabel
//{
//    if (_replyUserIdLabel == nil) {
//        _replyUserIdLabel = [[UILabel alloc] init];
//        _replyUserIdLabel.textColor = UIColor.headlineText;
//        _replyUserIdLabel.font = [UIFont gmBoldFont:13];
//    }
//    return _replyUserIdLabel;
//}
//
//- (UILabel *)contentLabel
//{
//    if (_contentLabel == nil) {
//        _contentLabel = [[UILabel alloc] init];
//        _contentLabel.textColor = UIColor.headlineText;
//        _contentLabel.font = [UIFont gmFont:13];
//    }
//    return _contentLabel;
//}
//
//- (UIImageView *)directionImageView
//{
//    if (_directionImageView == nil) {
//        _directionImageView = [[UIImageView alloc] init];
//        _directionImageView.image = [UIImage imageNamed:@"group_replay_direction"];
//        //        _directionImageView.contentMode = UIViewContentModeScaleAspectFit;
//        [_directionImageView sizeToFit];
//    }
//    return _directionImageView;
//}
//@end
//
//
//
//
