1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- //
- // ASPointDetailTableView.m
- // Asteria
- //
- // Created by iOS on 2023/6/24.
- //
- #import "ASPointDetailTableView.h"
- #import "ASPointDetailCell.h"
- @interface ASPointDetailTableView ()<UITableViewDelegate,UITableViewDataSource>
- @end
- @implementation ASPointDetailTableView
- - (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style {
- self = [super initWithFrame:frame style:style];
- if (self) {
- [self configSelf];
- }
- return self;
- }
-
- - (void)configSelf {
- [self baseSet];
- [self registerClass:[ASPointDetailCell class] forCellReuseIdentifier:@"ASPointDetailCell"];
- self.delegate = self;
- self.dataSource = self;
- self.alwaysBounceVertical = true;
- self.showsVerticalScrollIndicator = false;
- }
- // MARK: - delegate,datasource
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- return self.dataArr.count;
- }
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- ASPointDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ASPointDetailCell" forIndexPath:indexPath];
- if (self.dataArr.count <= indexPath.row) {
- return cell;
- }
- ASPointDetailModel *m = self.dataArr[indexPath.row];
- [cell setData:m];
- return cell;
- }
- @end
|