| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- //
- // diskListTableView.m
- // 隐私保护
- //
- // Created by xd h on 2024/1/23.
- //
- #import "diskListTableView.h"
- #import "diskListTableCell.h"
- @interface diskListTableView()<UITableViewDataSource,UITableViewDelegate>
- @end
- @implementation diskListTableView
- #pragma mark - init
- - (instancetype)init {
- self = [super init];
- if (self) {
- [self initCommon];
- }
- return self;
- }
- - (instancetype)initWithCoder:(NSCoder *)coder {
- self = [super initWithCoder:coder];
- if (self) {
- [self initCommon];
- }
- return self;
- }
- - (id)initWithFrame:(CGRect)frame {
- self = [super initWithFrame:frame];
- if (self) {
- [self initCommon];
- }
- return self;
- }
- - (void)initCommon {
- self.delegate = self;
- self.dataSource = self;
- self.separatorStyle = UITableViewCellSeparatorStyleNone;
- self.backgroundColor = [UIColor colorWithRed:235.0/255.0 green:235.0/255.0 blue:235.0/255.0 alpha:1.0];
- }
- #pragma mark - uitableviewDelegate
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- static NSString *cellIdentifer = @"diskListTableCell";
- diskListTableCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifer forIndexPath:indexPath];
- if(cell == nil){
- cell = [[diskListTableCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifer];
- }
-
- return cell;
- }
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- return 1;
- }
- - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
- return 60.0;
- }
- - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
- [tableView deselectRowAtIndexPath:indexPath animated:YES];
-
- }
- @end
|