// // MineCommonUsedView.m // Private-X // // Created by xd h on 2024/6/21. // #import "MineCommonUsedView.h" @interface MineCommonUsedView () @property(nonatomic,strong) UILabel*titleLabel; @end @implementation MineCommonUsedView - (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_Privacy_Model",nil), //NSLocalizedString(@"mine_cloudPhone_Model_title",nil), //NSLocalizedString(@"mine_help_title",nil), NSLocalizedString(@"my_set_no_change_phone",nil), NSLocalizedString(@"my_set_no_connect_kefu",nil), NSLocalizedString(@"my_set_no_clear_cache",nil), NSLocalizedString(@"my_set_no_check_update",nil), //NSLocalizedString(@"mine_newuser_title",nil), //NSLocalizedString(@"mine_sn_cancel_title",nil) ]; NSArray *imageArr = @[@"mine_Privacy_icon", @"mine_cloudPhone_model_icon", @"mine_help_icon", @"mine_changePhone_icon", @"mine_customer_icon", @"mine_clear_icon", @"mine_version_icon", @"mine_newUser_icon", //@"mine_cancell_icon", ]; CGFloat butTopY = 50.0; CGFloat imageWH = 28.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