// // PayRecoderListViewController.m // 隐私保护 // // Created by APPLE on 2023/8/29. // #import "PayRecoderListViewController.h" #import "BuyRecoderListCell.h" #import "PayRecoderDetailViewController.h" @interface PayRecoderListViewController () @property (nonatomic, strong, nullable) UITableView *tableView; @property (nonatomic, strong, nullable) NSMutableArray *tableDataSource; @end @implementation PayRecoderListViewController @synthesize tableDataSource; - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. [self drawAnyView]; } - (void)drawAnyView{ [self.view setBackgroundColor:HWF5F7FAColor]; [self.toolBar setHidden:YES]; [self.navigationBar setHidden:YES]; [self.navBarBGView setHidden:NO]; [self.titleLabel setText:NSLocalizedString(@"buy_vip_buy_recoder_title",nil)]; [self.view addSubview:self.tableView]; [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(0); make.right.mas_equalTo(0); make.bottom.mas_equalTo(0); make.top.equalTo(self.navBarBGView.mas_bottom).offset(4); }]; } /* #pragma mark - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller. } */ #pragma mark - 懒加载 - (UITableView *)tableView{ if (!_tableView) { _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H - TABBARHEIGHT) style:UITableViewStyleGrouped]; _tableView.delegate = self; _tableView.dataSource = self; _tableView.showsVerticalScrollIndicator = NO; _tableView.showsHorizontalScrollIndicator = NO; _tableView.contentInset = UIEdgeInsetsMake(-20, 0, 0, 0); [_tableView setSeparatorStyle:(UITableViewCellSeparatorStyleNone)]; [_tableView setSeparatorColor:[UIColor clearColor]]; [_tableView setBackgroundColor:[UIColor clearColor]]; [_tableView setTableFooterView:[UIView new]]; [_tableView setBounces:YES]; if (@available(iOS 15.0, *)) { _tableView.sectionHeaderTopPadding = 0; } } return _tableView; } #pragma mark - 列表委托 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { // return tableDataSource.count; /*测试*/ return 8; } - (BuyRecoderListCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ NSInteger row = indexPath.row; static NSString *identifier = @"BuyRecoderListCell"; BuyRecoderListCell * cell = [tableView dequeueReusableCellWithIdentifier:identifier]; cell.selectionStyle = UITableViewCellSelectionStyleNone; if (!cell){ cell = [[BuyRecoderListCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier]; cell.delegate = self; [cell setSelectionStyle:UITableViewCellSelectionStyleNone]; [cell setBackgroundColor:[UIColor clearColor]]; [cell setAccessoryType:(UITableViewCellAccessoryNone)]; } return cell; } - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ return 203; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ [tableView deselectRowAtIndexPath:indexPath animated:YES]; NSInteger row = indexPath.row; } #pragma mark - 订单回调委托 - (void)buyRecoderListCellOrderDetailBtnClick{ /*订单详情*/ PayRecoderDetailViewController *nextVC = [[PayRecoderDetailViewController alloc] init]; [self.navigationController pushViewController:nextVC animated:YES]; } @end