// // HRChatRoomSearchVC.m // VQU // // Created by xiaohaoran on 2021/11/9. // Copyright © 2021 MS. All rights reserved. // #import "YOUPAIHRChatRoomSearchResultVC.h" #import "YOUPAIHRSearchLiveRoomCell.h" @interface YOUPAIHRChatRoomSearchResultVC () @property(nonatomic,strong)UITableView *youpaiptableView; @end @implementation YOUPAIHRChatRoomSearchResultVC - (void)viewDidLoad { [super viewDidLoad]; self.title = @"相关聊天室"; [self youpaiptableView]; } -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ return 84; } -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ return 10; } -(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ YOUPAIHRSearchLiveRoomCell *cell = [tableView dequeueReusableCellWithIdentifier:@"HRSearchLiveRoomID" forIndexPath:indexPath];; if (cell == nil) { cell = [[YOUPAIHRSearchLiveRoomCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"HRSearchLiveRoomID"]; } [cell setSelectionStyle:UITableViewCellSelectionStyleNone]; cell.backgroundColor = LCBkgColor; return cell; } -(UITableView *)youpaiptableView{ if (_youpaiptableView == nil) { _youpaiptableView = [[UITableView alloc]initWithFrame:CGRectZero style:UITableViewStylePlain]; [self.view addSubview:_youpaiptableView]; [_youpaiptableView mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(NavBarHeight); make.left.mas_equalTo(0); make.right.mas_equalTo(0); make.bottom.mas_equalTo(-SafeHeight); }]; _youpaiptableView.delegate = self; _youpaiptableView.dataSource = self; _youpaiptableView.backgroundColor = [UIColor clearColor]; _youpaiptableView.separatorStyle = UITableViewCellSeparatorStyleNone; _youpaiptableView.showsVerticalScrollIndicator = NO; _youpaiptableView.showsHorizontalScrollIndicator = NO; if (@available(iOS 15.0, *)) { _youpaiptableView.sectionHeaderTopPadding = 0; } [_youpaiptableView registerClass:[YOUPAIHRSearchLiveRoomCell class] forCellReuseIdentifier:@"HRSearchLiveRoomID"]; } return _youpaiptableView; } @end