// // NASCommonUsedView.m // 双子星云手机 // // Created by xd h on 2024/6/19. // #import "NASCommonUsedView.h" @interface NASCommonUsedView () { UIView* rightRedView; } @property(nonatomic,strong) UILabel*titleLabel; @end @implementation NASCommonUsedView - (id)initWithFrame:(CGRect)frame{ self = [super initWithFrame:frame]; //self.backgroundColor = [UIColor clearColor]; [self drawAnyView]; return self; } -(void)drawAnyView { UIView *whiteBgView = [[UIView alloc] init]; whiteBgView.backgroundColor = [UIColor whiteColor]; [self addSubview:whiteBgView]; whiteBgView.layer.cornerRadius = 12; whiteBgView.layer.masksToBounds = YES; [whiteBgView mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(0); make.left.mas_equalTo(16); make.right.mas_equalTo(-16); make.bottom.mas_equalTo(0); }]; _titleLabel = [[UILabel alloc] init]; _titleLabel.font = [UIFont boldSystemFontOfSize:16.0]; _titleLabel.textColor = [UIColor hwColor:@"#0A132B"]; _titleLabel.text = NSLocalizedString(@"NAS_common_used",nil); [whiteBgView addSubview:_titleLabel]; [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(16); make.left.mas_equalTo(16); make.right.mas_equalTo(-24-12-10); make.height.mas_equalTo(20); }]; NSArray *titleArr = @[NSLocalizedString(@"my_set_no_File_backups",nil), NSLocalizedString(@"set_file_Transfer_WWAN_title2",nil), NSLocalizedString(@"my_set_no_share2",nil) //,NSLocalizedString(@"my_set_no_share",nil) ]; NSArray *imageArr = @[@"nas_backups_icon", @"nas_set_icon", @"nas_share_icon" //,@"nas_share_icon" ]; CGFloat butTopY = 50.0; CGFloat imageWH = 32.0; CGFloat butHeight = imageWH +20 +5; CGFloat butWidth = 70.0; CGFloat butSpace = (SCREEN_W -16*2 - butWidth*4)/5.0; for (int i=0; i