// // ReplayMeLikeVC.m // smartRhino // // Created by niuzhen on 2020/6/11. // Copyright © 2020 tederen. All rights reserved. // #import "ReplayMeLikeVC.h" #import "MyTDGroupView.h" #import "ReplayMeCell.h" #import "ReplayMeSearchVC.h" @interface ReplayMeLikeVC () @property (weak, nonatomic) IBOutlet UIView *navBar; @property (weak, nonatomic) IBOutlet UIView *HeadView; @property (weak, nonatomic) IBOutlet UITableView *tableView; @property (weak, nonatomic) IBOutlet UILabel *titleL; @property (strong, nonatomic) MyTDGroupView *SearchView; @end @implementation ReplayMeLikeVC +(ReplayMeLikeVC *)initReplayMeLikeVC{ ReplayMeLikeVC *controller = [StoryboardManager.shared.Source instantiateViewControllerWithIdentifier:@"ReplayMeLikeVC"]; return controller; } - (MyTDGroupView *)SearchView { if (!_SearchView) { _SearchView = [[MyTDGroupView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 36)]; } return _SearchView; } - (void)viewDidLoad { [super viewDidLoad]; self.fd_prefersNavigationBarHidden = YES; self.tableView.delegate = self; self.tableView.dataSource = self; [self.HeadView addSubview:self.SearchView]; [self.SearchView mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_offset(6); make.left.right.mas_equalTo(self.HeadView); make.height.mas_offset(36); }]; self.titleL.text = @"共收到赞(346)"; WS(weakSelf); [self.SearchView.button setAction:^{ ReplayMeSearchVC * vc = [[ReplayMeSearchVC alloc] init]; [weakSelf.navigationController pushViewController:vc animated:YES]; }]; [self.tableView reloadData]; } #pragma mark -UITableViewDelegate - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 20; } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return UITableViewAutomaticDimension; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { ReplayMeCell * cell = [ReplayMeCell configCell:tableView indexPath:indexPath]; cell.contentL.text = @"点赞了你的笔记"; [cell setDatasubText]; if (indexPath.row >= 3) { cell.redV.hidden = YES; } return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; } @end