| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- //
- // allVersionView.m
- // 隐私保护
- //
- // Created by xd h on 2023/11/27.
- //
- #import "allVersionView.h"
- @interface allVersionView ()<UITableViewDelegate,UITableViewDataSource>
- @property(nonatomic,strong)UIView *whiteBgView;
- @property(nonatomic,strong)UITableView *tableView;
- @end
- @implementation allVersionView
- - (id)initWithFrame:(CGRect)frame{
- self = [super initWithFrame:frame];
-
- [self drawAnyView];
-
- return self;
- }
- - (void)drawAnyView{
- self.backgroundColor = [UIColor hwColor:@"#000000" alpha:0.6];
-
- _whiteBgView = [[UIView alloc] init];
- _whiteBgView.layer.cornerRadius = 8;
- [self addSubview:_whiteBgView];
-
- [_whiteBgView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(20);
- make.right.mas_equalTo(-20);
- make.height.mas_equalTo(300);
- make.centerY.mas_equalTo(self.center).offset(-20);
- }];
-
- UIButton* delBut = [[UIButton alloc] init];
- [delBut setImage:[UIImage imageNamed:@"common_del"] forState:UIControlStateNormal];
- [_whiteBgView addSubview:delBut];
-
- [delBut mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.mas_equalTo(0);
- make.right.mas_equalTo(0);
- make.width.mas_equalTo(40);
- make.height.mas_equalTo(40.0);
- }];
-
- //UILabel * version
- }
- #pragma mark - 懒加载
- - (UITableView *)tableView{
- if (!_tableView) {
- _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 0, 0) style:UITableViewStylePlain];
- _tableView.delegate = self;
- _tableView.dataSource = self;
- _tableView.showsVerticalScrollIndicator = NO;
- _tableView.showsHorizontalScrollIndicator = NO;
- // _tableView.contentInset = UIEdgeInsetsMake(-H_STATE_BAR, 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;
- }
- @end
|